DefaultControllerFactory Class

 

Represents the controller factory that is registered by default.

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

Inheritance Hierarchy

System.Object
  System.Web.Mvc.DefaultControllerFactory

Syntax

public class DefaultControllerFactory : IControllerFactory
public ref class DefaultControllerFactory : IControllerFactory
type DefaultControllerFactory = 
    class
        interface IControllerFactory
    end
Public Class DefaultControllerFactory
    Implements IControllerFactory

Constructors

Name Description
System_CAPS_pubmethod DefaultControllerFactory()

Initializes a new instance of the DefaultControllerFactory class.

System_CAPS_pubmethod DefaultControllerFactory(IControllerActivator)

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

Methods

Name Description
System_CAPS_pubmethod CreateController(RequestContext, String)

Creates the specified controller by using the specified request context.

System_CAPS_pubmethod Equals(Object)

(Inherited from Object.)

System_CAPS_protmethod Finalize()

(Inherited from Object.)

System_CAPS_protmethod GetControllerInstance(RequestContext, Type)

Retrieves the controller instance for the specified request context and controller type.

System_CAPS_protmethod GetControllerSessionBehavior(RequestContext, Type)

Returns the controller's session behavior.

System_CAPS_protmethod GetControllerType(RequestContext, String)

Retrieves the controller type for the specified name and request context.

System_CAPS_pubmethod GetHashCode()

(Inherited from Object.)

System_CAPS_pubmethod GetType()

(Inherited from Object.)

System_CAPS_protmethod MemberwiseClone()

(Inherited from Object.)

System_CAPS_pubmethod ReleaseController(IController)

Releases the specified controller.

System_CAPS_pubmethod ToString()

(Inherited from Object.)

Explicit Interface Implementations

Name Description
System_CAPS_pubinterfaceSystem_CAPS_privmethod IControllerFactory.GetControllerSessionBehavior(RequestContext, String)

This API supports the ASP.NET MVC infrastructure and is not intended to be used directly from your code. This method calls the GetControllerSessionBehavior method.

Remarks

This class provides a convenient base class for developers who want to make only minor changes to controller creation. This class calls the Dispose method for any controller that implements the IDisposable interface.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

System.Web.Mvc Namespace

Return to top