-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Change some metadata extension methods into DIM properties and annotate for nullability #23361
Conversation
All public extensions should continue to be methods to avoid the breaking change, using properties doesn't give any significant enough advantage. Eventually we'll need to convert all of them to DIM - #19213 |
@AndriySvyryd are you saying to want me to add back the extension methods, calling the new properties, to maintain binary backwards compat here? Or that you're against the properties altogether (although we want to do #19213 anyway)? Re the advantage of properties, the main reason for introducing them was to be able to use the new [MemberNotNullWhen], which isn't usable on extension methods. |
@roji No, I'm saying that they should be methods with DIM. We don't necessarily need binary compat, but we should preserve compile compat. |
Will change. |
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.
HasClrType
can become a property, since it was pubternal before
cd77d47
to
2a11111
Compare
72d938b
to
05a84bc
Compare
Hello @roji! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
(Removed auto-merge, I will add it back. Trying to get release/5.0 merged to main) |
(nit) Commit description is not accurate |
* Turn HasDefiningNavigation from extension to DIM * Turn HasClrType into a DIM property
05a84bc
to
77b6197
Compare
@AndriySvyryd fixed, @smitpatel no problem. |
@AndriySvyryd we can also move other extension methods to be properties on the interfaces if we want (especially internal ones).