-
Notifications
You must be signed in to change notification settings - Fork 635
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
Do not implement props in ViewExtensionBase #11350
Conversation
This changes the definition of ViewExtensionBase to use abstract rather than virtual for the definition of required properties like Name and UniqueId. The use of virtual was creating a backing field which was not used in ViewExtensionBase and could not be assigned in the inheriting class, making it pretty much useless. Also the Dispose method is declared as abstract, as it was already required to implement and having a default empty implementation could lead developers to oversight the need to dispose resources in their extension.
While I was making this PR @QilongTang told me the release of 2.10 is already done. Releasing this in 2.11 would make this a technically a breaking change with respect to 2.10. However, that breaking change will actually reveal issues in the extension developed, so it could be argued whether this is actually beneficial. |
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.
While this looks like a good move in the right direction, it could be a breaking change, right? Ok, just saw your comment above.
I actually am confused about the purpose of |
I guess the discussion for the need of |
Ah, now I remember. Thanks for the context. In that case, it seems less risky to break this at this stage. |
Is this a big enough issue that we should cherry pick to 2.10 and rtm that build?
… On Dec 9, 2020, at 10:35 AM, Martin Misol Monzo ***@***.***> wrote:
I guess the discussion for the need of ViewExtensionBase came from the discussions here and here. As a summary, it is used as a way to extend the view extension API without adding a new member in the IViewExtension interface. Extension developers can implement these members by inheriting from the ViewExtensionBase class. Dynamo dynamically checks whether the extension actually implements the base class and, if that case, it calls them. For now this is used for the Closed function that was recently added.
—
You are receiving this because your review was requested.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
This changes the definition of ViewExtensionBase to use abstract rather than virtual for the definition of required properties like Name and UniqueId. The use of virtual was creating a backing field which was not used in ViewExtensionBase and could not be assigned in the inheriting class, making it pretty much useless. Also the Dispose method is declared as abstract, as it was already required to implement and having a default empty implementation could lead developers to oversight the need to dispose resources in their extension.
This changes the definition of ViewExtensionBase to use abstract rather than virtual for the definition of required properties like Name and UniqueId. The use of virtual was creating a backing field which was not used in ViewExtensionBase and could not be assigned in the inheriting class, making it pretty much useless. Also the Dispose method is declared as abstract, as it was already required to implement and having a default empty implementation could lead developers to oversight the need to dispose resources in their extension.
Purpose
This changes the definition of ViewExtensionBase to use abstract rather
than virtual for the definition of required properties like Name and
UniqueId. The use of virtual was creating a backing field which was not
used in ViewExtensionBase and could not be assigned in the inheriting
class, making it pretty much useless.
Also the Dispose method is declared as abstract, as it was already
required to implement and having a default empty implementation could
lead developers to oversight the need to dispose resources in their
extension.
Declarations
Check these if you believe they are true
*.resx
files