Support AccessModifier for BindableDerivedList#399
Merged
ChrisPulman merged 3 commits intomainfrom Apr 4, 2026
Merged
Conversation
Add an AccessModifier property to the BindableDerivedListAttribute and propagate it through the generator so generated properties use the requested access level. The generator now reads the AccessModifier named argument, maps enum values to C# access keywords, and includes the access modifier in BindableDerivedListInfo and the generated property template. Tests were added/updated to cover internal-class behavior and all supported access modifiers, and corresponding generated test files were added/updated.
Add two auto-generated verification files for DerivedList tests: a BindableDerivedListAttribute definition and a partial TestVM with ReadOnlyObservableCollection properties. The attribute (internal) exposes a PropertyAccessModifier init-only property. The TestVM partial exposes read-only properties for fields with various access modifiers (public, protected, internal, private, protected internal, private protected) and marks them as excluded from code coverage.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #399 +/- ##
==========================================
+ Coverage 61.97% 62.16% +0.19%
==========================================
Files 75 75
Lines 4084 4105 +21
Branches 571 572 +1
==========================================
+ Hits 2531 2552 +21
Misses 1385 1385
Partials 168 168 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
glennawatson
approved these changes
Apr 4, 2026
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.
What kind of change does this PR introduce?
Fixes #387
What is the current behavior?
#387
What is the new behavior?
Add an AccessModifier property to the BindableDerivedListAttribute and propagate it through the generator so generated properties use the requested access level.
The generator now reads the AccessModifier named argument, maps enum values to C# access keywords, and includes the access modifier in BindableDerivedListInfo and the generated property template.
Tests were added/updated to cover internal-class behavior and all supported access modifiers, and corresponding generated test files were added/updated.
What might this PR break?
AccessModifier defaults to public
Please check if the PR fulfills these requirements
Other information: