C# Class Courses.Gui.Client.ClientControllerFactory

Фабрика, которая будет управлять нашим ManagerController
Inheritance: System.Web.Mvc.DefaultControllerFactory, IHttpControllerActivator
Show file Open project: denismaster/dotnet01

Public Methods

Method Description
ClientControllerFactory ( ) : System
Create ( HttpRequestMessage request, System controllerDescriptor, Type controllerType ) : System.Web.Http.Controllers.IHttpController

Protected Methods

Method Description
GetControllerInstance ( System requestContext, Type controllerType ) : System.Web.Mvc.IController

Получаем контроллер, делая resolve зависимостей с Ninject

Private Methods

Method Description
AddBindings ( ) : void

Настраиваем контейнер

Method Details

ClientControllerFactory() public method

public ClientControllerFactory ( ) : System
return System

Create() public method

public Create ( HttpRequestMessage request, System controllerDescriptor, Type controllerType ) : System.Web.Http.Controllers.IHttpController
request System.Net.Http.HttpRequestMessage
controllerDescriptor System
controllerType System.Type
return System.Web.Http.Controllers.IHttpController

GetControllerInstance() protected method

Получаем контроллер, делая resolve зависимостей с Ninject
protected GetControllerInstance ( System requestContext, Type controllerType ) : System.Web.Mvc.IController
requestContext System
controllerType System.Type
return System.Web.Mvc.IController