Skip to content

Avoid creating empty ArrayValue instances#781

Merged
sebastienros merged 3 commits intosebastienros:mainfrom
lahma:avoid-empty-arryay-creation
Apr 21, 2025
Merged

Avoid creating empty ArrayValue instances#781
sebastienros merged 3 commits intosebastienros:mainfrom
lahma:avoid-empty-arryay-creation

Conversation

@lahma
Copy link
Copy Markdown
Collaborator

@lahma lahma commented Apr 21, 2025

To my understanding, these ad hoc conversions required when doing interop between model and the template so these a transient and will not need to later reflect any state changes done in models. In NSwag there are properties that return empty enumerables with dynamic LINQ where outcome is an empty enumerator 90% of the cases.

lahma and others added 2 commits April 21, 2025 19:12
Co-authored-by: Hisham Bin Ateya <hishamco_2007@yahoo.com>
Co-authored-by: Hisham Bin Ateya <hishamco_2007@yahoo.com>
@sebastienros sebastienros merged commit 29cfd68 into sebastienros:main Apr 21, 2025
@lahma lahma deleted the avoid-empty-arryay-creation branch April 21, 2025 16:44
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.

3 participants