This change removes the IActionContextAccessor as a dependency of
UrlHelper, and shifts UrlHelper to use a factory pattern. Consumers of
IUrlHelper should create an instance using the factory when needed.
This is the last part of MVC that has a dependency on IActionContext
accessor. As part of this change we no longer register it by default, and
treat it as an optional component.
This change completely removes [Activate]. In a controller, you should
constructor injection or [FromServices] to access services.
To access context items (ActionContext, ActionBindingContext, root
ViewDataDictionary) you should use the respected attribute class.
We'd like to consider streamlining this further in the future by getting
down to a single injectable context for controllers, but for now this will
have to do.
services
* Added WithControllersFromServiceProvider that replaces the default
controller activator with a service based one.
* Move activation to DefaultControllerFactory
* Modify [Activate] behavior so that it no longer activates services. Use
[FromService] attribute to hydrate services
Fixes#1707