Feature/8.7.1 - #116
Merged
Merged
Conversation
Co-authored-by: pmrogala <9459432+pmrogala@users.noreply.github.com>
Co-authored-by: pmrogala <9459432+pmrogala@users.noreply.github.com>
Co-authored-by: pmrogala <9459432+pmrogala@users.noreply.github.com>
Co-authored-by: pmrogala <9459432+pmrogala@users.noreply.github.com>
…ableTypeFullName Co-authored-by: pmrogala <9459432+pmrogala@users.noreply.github.com>
…tc.) Co-authored-by: pmrogala <9459432+pmrogala@users.noreply.github.com>
…generic parameters Co-authored-by: pmrogala <9459432+pmrogala@users.noreply.github.com>
…115) * Initial plan * Add AddTo method generation for arrays with child builders - Added ArrayCollectionMetadata class to represent array collections - Updated CollectionMethodDetector to detect and handle array types - Implemented array-specific AddTo method generation for both regular and child builder scenarios - Added ParentWithChildArrayEntity test entity - Added comprehensive integration tests for array AddTo methods - Updated CHANGELOG.md with fix details Co-authored-by: pmrogala <9459432+pmrogala@users.noreply.github.com> * Remove unused imports from ParentWithChildArrayEntity Co-authored-by: pmrogala <9459432+pmrogala@users.noreply.github.com> * Refactor array handling to use List internally with ToArray() conversion Updated approach per code review feedback: - Arrays now use List<T> for internal storage - Conversion to array happens in Build() method via ToArray() - AddTo methods use List.Add/AddRange instead of Array.Copy - Simpler and more performant for multiple AddTo calls Note: This changes semantics - With methods now create new array instances rather than preserving reference equality. 8 tests fail due to this change. Co-authored-by: pmrogala <9459432+pmrogala@users.noreply.github.com> * Revert to array backing field with Array.Copy approach Reverted changes from commit 5eab549 to restore the original Array.Copy implementation from commit ac3a84b. This preserves reference equality semantics for With methods while still supporting AddTo methods for arrays. All 111 tests now pass (previously 8 were failing with List approach). Co-authored-by: pmrogala <9459432+pmrogala@users.noreply.github.com> * Refactor: Consolidate array and concrete collection AddTo generation Unified the code generation for arrays and concrete collections to reduce duplication. Both types now share the same pattern with conditional logic to handle the differences (Array.Copy vs collection.Add). This addresses code review feedback about similar-looking generation code between ArrayCollectionMetadata and ConcreteCollectionMetadata. Co-authored-by: pmrogala <9459432+pmrogala@users.noreply.github.com> * Improve code readability in child builder AddTo generation Extracted the inline conditional for whitespace formatting into a clearer methodBody variable. This makes the code more maintainable and easier to understand. Co-authored-by: pmrogala <9459432+pmrogala@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: pmrogala <9459432+pmrogala@users.noreply.github.com> Co-authored-by: Cranter <progala@ecovadis.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.