DefaultControllerFactory Constructor

 

Initializes a new instance of the DefaultControllerFactory class.

Namespace:   System.Web.Mvc
Assembly:  System.Web.Mvc (in System.Web.Mvc.dll)

NameDescription
System_CAPS_pubmethodDefaultControllerFactory()

Initializes a new instance of the DefaultControllerFactory class.

System_CAPS_pubmethodDefaultControllerFactory(IControllerActivator^)

Initializes a new instance of the DefaultControllerFactory class using a controller activator.

Return to top

DefaultControllerFactory Constructor ()

Initializes a new instance of the DefaultControllerFactory class.

public:
DefaultControllerFactory()
Return to top

DefaultControllerFactory Constructor (IControllerActivator^)

Initializes a new instance of the DefaultControllerFactory class using a controller activator.

public:
DefaultControllerFactory(
	IControllerActivator^ controllerActivator
)

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" />.
Return to top
Show: