C# Класс Rebel.Cms.Web.Routing.RenderRouteHandler

Custom route handler to assign the correct controller based on the Rebel request
Наследование: IRouteHandler
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
GetHttpHandler ( System.Web.Routing.RequestContext requestContext ) : IHttpHandler

Assigns the correct controller based on the Rebel request and returns a standard MvcHandler to prcess the response, this also stores the render model into the data tokens for the current RouteData.

RenderRouteHandler ( IControllerFactory controllerFactory, IRebelApplicationContext applicationContext, IRenderModelFactory modelFactory ) : System

Защищенные методы

Метод Описание
GetHandlerForRoute ( System.Web.Routing.RequestContext requestContext, IRebelRenderModel renderModel ) : IHttpHandler

this will determine the controller and set the values in the route data

GetRebelRouteDefinition ( System.Web.Routing.RequestContext requestContext, IRebelRenderModel renderModel ) : RouteDefinition

Returns a RouteDefinition object based on the current renderModel

HandlePostedValues ( System.Web.Routing.RequestContext requestContext, PostedDataProxyInfo postedInfo, IRebelRenderModel renderModel, RouteDefinition routeDefinition ) : IHttpHandler

Handles a posted form to an Rebel Url and ensures the correct controller is routed to and that the right DataTokens are set.

Приватные методы

Метод Описание
GetPostedFormInfo ( System.Web.Routing.RequestContext requestContext ) : PostedDataProxyInfo

Checks the request and query strings to see if it matches the definition of having a Surface controller posted value, if so, then we return a PostedDataProxyInfo object with the correct information.

Описание методов

GetHandlerForRoute() защищенный Метод

this will determine the controller and set the values in the route data
protected GetHandlerForRoute ( System.Web.Routing.RequestContext requestContext, IRebelRenderModel renderModel ) : IHttpHandler
requestContext System.Web.Routing.RequestContext
renderModel IRebelRenderModel
Результат IHttpHandler

GetHttpHandler() публичный Метод

Assigns the correct controller based on the Rebel request and returns a standard MvcHandler to prcess the response, this also stores the render model into the data tokens for the current RouteData.
public GetHttpHandler ( System.Web.Routing.RequestContext requestContext ) : IHttpHandler
requestContext System.Web.Routing.RequestContext
Результат IHttpHandler

GetRebelRouteDefinition() защищенный Метод

Returns a RouteDefinition object based on the current renderModel
protected GetRebelRouteDefinition ( System.Web.Routing.RequestContext requestContext, IRebelRenderModel renderModel ) : RouteDefinition
requestContext System.Web.Routing.RequestContext
renderModel IRebelRenderModel
Результат RouteDefinition

HandlePostedValues() защищенный Метод

Handles a posted form to an Rebel Url and ensures the correct controller is routed to and that the right DataTokens are set.
protected HandlePostedValues ( System.Web.Routing.RequestContext requestContext, PostedDataProxyInfo postedInfo, IRebelRenderModel renderModel, RouteDefinition routeDefinition ) : IHttpHandler
requestContext System.Web.Routing.RequestContext
postedInfo PostedDataProxyInfo
renderModel IRebelRenderModel
routeDefinition RouteDefinition The original route definition that would normally be used to route if it were not a POST
Результат IHttpHandler

RenderRouteHandler() публичный Метод

public RenderRouteHandler ( IControllerFactory controllerFactory, IRebelApplicationContext applicationContext, IRenderModelFactory modelFactory ) : System
controllerFactory IControllerFactory
applicationContext IRebelApplicationContext
modelFactory IRenderModelFactory
Результат System