Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ExpandoObjectConverter for JavaScript object conversion #5896

Merged
merged 1 commit into from
Aug 14, 2024

Conversation

sfmskywalker
Copy link
Member

@sfmskywalker sfmskywalker commented Aug 13, 2024

Introduced ConverterHelper and ExpandoObjectConverter to handle conversions from .NET dynamic objects to JavaScript objects. Updated integration tests to validate the conversion and sorting functionalities.

Fixes #5895


This change is Reviewable

Introduced `ConverterHelper` and `ExpandoObjectConverter` to handle conversions from .NET dynamic objects to JavaScript objects. Updated integration tests to validate the conversion and sorting functionalities.

Fixes #5895

internal static class ConverterHelper
{
public static ObjectInstance ConvertToJsObject(Engine engine, IDictionary<string, object?> expando)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we make this internal as well?


internal static class ConverterHelper
{
public static ObjectInstance ConvertToJsObject(Engine engine, IDictionary<string, object?> expando)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This method is missing a summary


internal class ExpandoObjectConverter : IObjectConverter
{
public bool TryConvert(Engine engine, object value, out JsValue result)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we make this internal as well?


internal class ExpandoObjectConverter : IObjectConverter
{
public bool TryConvert(Engine engine, object value, out JsValue result)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This method is missing a summary

@raymonddenhaan raymonddenhaan merged commit fbf3418 into patch/3.2.x Aug 14, 2024
6 of 7 checks passed
@raymonddenhaan raymonddenhaan deleted the bug/5895 branch August 14, 2024 07:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Array.Sort() Not Working as Expected on ExpandoObject Fields
2 participants