-
-
Notifications
You must be signed in to change notification settings - Fork 217
feature: Add protected FindParent method #692
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
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
It is a good idea. However, with this implementation, it seems that the following conditions have to be met. if (parentReference.Type != null && parentReference.Type != GetType()) Shouldn't it be possible to override with or without parentReference.Type? |
That's true. I'll make a small design change so that the override can be either. |
Thank you very much. I think it's good. The only point, is that it doesn't seem very clear from the point of view of the user considering override how Since |
140ed4e
to
5970e32
Compare
Thank @hadashiA! I had to fight my commit history a little bit to get a clean PR, but this should simplify the interface. |
👍 Thanks for the fixing. |
This will allow implementors the opportunity to override runtime Find behavior. This is particularly useful for projects that implement multiple potential parent scopes and need a way to disambiguate them.
For example, some child scopes might want to specifically find ancestors up their transform tree:
All unit tests pass with this change and because the implementation is a virtual method that defaults to the previous functionality, current behavior is unchanged.