Skip to content

Support AccessModifier for BindableDerivedList#399

Merged
ChrisPulman merged 3 commits intomainfrom
CP_FixFor387
Apr 4, 2026
Merged

Support AccessModifier for BindableDerivedList#399
ChrisPulman merged 3 commits intomainfrom
CP_FixFor387

Conversation

@ChrisPulman
Copy link
Copy Markdown
Member

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

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

Other information:

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
Copy link
Copy Markdown

codecov bot commented Apr 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 62.16%. Comparing base (9c5166c) to head (08eb28b).
⚠️ Report is 1 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ChrisPulman ChrisPulman merged commit 499cb4d into main Apr 4, 2026
11 checks passed
@ChrisPulman ChrisPulman deleted the CP_FixFor387 branch April 4, 2026 15:12
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]: BindableDerivedListGenerator creates internal properties for internal classes

2 participants