DefaultControllerFactory Constructor
Initializes a new instance of the DefaultControllerFactory class.
Assembly: System.Web.Mvc (in System.Web.Mvc.dll)
| Name | Description | |
|---|---|---|
![]() | DefaultControllerFactory() | Initializes a new instance of the DefaultControllerFactory class. |
![]() | DefaultControllerFactory(IControllerActivator^) | Initializes a new instance of the DefaultControllerFactory class using a controller activator. |
DefaultControllerFactory Constructor ()
Initializes a new instance of the DefaultControllerFactory class.
DefaultControllerFactory Constructor (IControllerActivator^)
Initializes a new instance of the DefaultControllerFactory class using a controller activator.
Parameters
- controllerActivator
-
Type:
System.Web.Mvc::IControllerActivator^
An object that implements the controller activator interface.
This constructor provides more fine-grained control over how controllers are instantiated using dependency injection.
Controller activators do not implement T:System.GetType. They are responsible only for initializing an instance of a controller type. The controller factory is responsible for providing type information. When using this constructor, controller factories should delegate to an object that implements IControllerActivator to handle the instantiation of the controller.
The code snippet is not specified: <codeReference xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5" />.