-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[XSG] Refactor MemberAccess to remove double negatives #33449
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
base: net11.0
Are you sure you want to change the base?
Conversation
Co-authored-by: simonrozsival <[email protected]>
…ssible to IsGetterAccessible/IsSetterAccessible Co-authored-by: simonrozsival <[email protected]>
Co-authored-by: simonrozsival <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR refactors the MemberAccess record properties from double negatives (IsGetterInaccessible, IsSetterInaccessible) to positive form (IsGetterAccessible, IsSetterAccessible) to improve code readability throughout the BindingSourceGen code generator.
Key Changes:
- Property defaults changed from
falsetotrue(members are accessible by default) - Logic inversions applied where properties are checked
- Pattern matching expressions updated to check for
falseinstead oftrue
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| PathPart.cs | Renamed properties to positive form, updated defaults to true, inverted logic in HasInaccessibleAccessor computation |
| PathParser.cs | Simplified assignment by removing double negation when setting property values |
| Setter.cs | Updated pattern matching from IsSetterInaccessible: true to IsSetterAccessible: false |
| AccessExpressionBuilder.cs | Updated pattern matching from IsGetterInaccessible: true to IsGetterAccessible: false |
| BindingCodeWriter.cs | Updated condition checks to negate positive properties (!member.IsGetterAccessible) |
| SetterBuilderTests.cs | Updated test data to use new property names with appropriate boolean values |
| BindingRepresentationGenTests.cs | Updated test expectations to use new property names |
| AccessExpressionBuilderTests.cs | Updated test data to use new property names |
|
/azp run maui-pr-devicetests |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Refactors
MemberAccessproperties from double negatives (IsGetterInaccessible,IsSetterInaccessible) to positive form (IsGetterAccessible,IsSetterAccessible) for improved readability.Changes
true, updatedHasInaccessibleAccessorcomputationIsSetterInaccessible: truetoIsSetterAccessible: falseSetterBuilderTests,AccessExpressionBuilderTests,BindingRepresentationGenTestsBefore/After
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.