C# Class Rebel.Cms.Web.Mvc.ControllerFactories.MasterControllerFactory

A controller factory which uses an internal list of IFilteredControllerFactory in order to invoke different controller factories dependent upon their implementation of IFilteredControllerFactory.CanHandle for the current request. Allows circumvention of MVC3's singly registered IControllerFactory.
Inheritance: System.Web.Mvc.DefaultControllerFactory
Mostra file Open project: RebelCMS/rebelcmsxu5

Public Methods

Method Description
CreateController ( System.Web.Routing.RequestContext requestContext, string controllerName ) : IController

Creates the specified controller by using the specified request context.

MasterControllerFactory ( IEnumerable controllerFactories ) : System
RegisterFactory ( IFilteredControllerFactory slaveFactory ) : void

Registers the factory.

ReleaseController ( IController controller ) : void

Releases the specified controller.

Protected Methods

Method Description
MasterControllerFactory ( ) : System

Method Details

CreateController() public method

Creates the specified controller by using the specified request context.
The parameter is null. The parameter is null or empty.
public CreateController ( System.Web.Routing.RequestContext requestContext, string controllerName ) : IController
requestContext System.Web.Routing.RequestContext The context of the HTTP request, which includes the HTTP context and route data.
controllerName string The name of the controller.
return IController

MasterControllerFactory() protected method

protected MasterControllerFactory ( ) : System
return System

MasterControllerFactory() public method

public MasterControllerFactory ( IEnumerable controllerFactories ) : System
controllerFactories IEnumerable
return System

RegisterFactory() public method

Registers the factory.
public RegisterFactory ( IFilteredControllerFactory slaveFactory ) : void
slaveFactory IFilteredControllerFactory The slave factory.
return void

ReleaseController() public method

Releases the specified controller.
public ReleaseController ( IController controller ) : void
controller IController The controller to release.
return void