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

Fix JsonDynamicArray enumeration in dynamic usages #16246

Merged
merged 3 commits into from
Jun 5, 2024

Conversation

gvkries
Copy link
Contributor

@gvkries gvkries commented Jun 5, 2024

Implements IEnumerable<object> on JsonDynamicArray and returns that enumerator from IEnumerable.GetEnumerator(). The existing IEnumerable<JsonNode> is kept, but is now implemented explicitly.

Anyone currently using an enumerator from JsonDynamicArray will now by default get an enumerable of objects, which are instances of our dynamic wrappers. Those are also implicitly convertible to JsonNode again, so callers should not lose anything.

Address an issue in #16233

@gvkries
Copy link
Contributor Author

gvkries commented Jun 5, 2024

Note that there are more issues noted in #16233 which are not yet solved by this PR.

@MikeAlhayek MikeAlhayek enabled auto-merge (squash) June 5, 2024 15:05
@MikeAlhayek MikeAlhayek merged commit 0a96f44 into OrchardCMS:main Jun 5, 2024
5 checks passed
@gvkries gvkries deleted the gvkries/jsondynarray-16233 branch June 6, 2024 12:41
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.

2 participants