Closed gtg092x closed 4 months ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
vcontainer | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Jul 11, 2024 5:52pm |
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 FindParent()
and FindParent(Type)
should be used.
Since FindParent()
probably also serves as a FindParnet(Type)
, why not just have the former be virtual?
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.