-
Notifications
You must be signed in to change notification settings - Fork 62
[generator] Generate more [SupportedOSPlatform] attributes to fix warnings. #868
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,6 +27,8 @@ public InterfaceInvokerProperty (InterfaceGen iface, Property property, CodeGene | |
IsPublic = true; | ||
IsUnsafe = true; | ||
|
||
SourceWriterExtensions.AddSupportedOSPlatform (Attributes, property.Getter, opt); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we have any instances where property getter & setter are in two separate API levels? Is this something we need to worry about or consider? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not aware of any, and at least for interfaces we probably wouldn't allow it to happen, as adding a required setter in a later API would be a breaking change. I think we can ignore this. |
||
|
||
HasGet = property.Getter != null; | ||
|
||
if (property.Getter != null) { | ||
|
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.
The last
AddInterfaceListenerEventsAndProperties()
parameter name issetMethod
, yetprop.Getter
is used here. Is this "mismatch" correct?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.
I renamed it to
setListenerMethod
to help indicate it is not about property getters/setters, it is a reference to the method that is used to set the listener, likeaddOnRoutingChangedListener
. (Also added a comment in the code for future reference.)