-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Description
We can't have property injection be taken care by the DefaultComponentActivator
as that would be a breaking change.
MVC defines a set of public APIs for activating properties in different contexts (tag helpers, view components, controller, razor pages).
In some cases, property activation is not exposed (like for Razor Pages) and only the page activator is available (single entry extension point for creating the component).
Unfortunately, we can't take that route as it will break existing custom implementations of the activator that now would also be responsible for performing property injection.
For that reason, I believe we need to introduce a separate IComponentPropertyActivator
to specifically support handling property activation.
The activator should return a delegate so that it can close over any state it needs to for performing the activation and receive the component instance as a parameter. We need to think if we also want to pass in a context object for future proofing ourselves in case we want to provide additional data in the future.