C# Класс Rebel.Cms.Web.Mvc.ActionFilters.SuccessfulOnRedirectAttribute

This checks if the result is a RedirectToRouteResult and if so either: - appends a 'success' query string with the parameter specified in the RouteData - Or, if a cookie is chosen, a new cookie will be created with the value of the parameter specified in the RouteData and a 'success' query string will be appended with the cookie id that was created
Наследование: AbstractTempDataCookieFilter
Показать файл Открыть проект

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

Метод Описание
EnsureRouteData ( Controller controller, string key, object value ) : void

Utility for ensuring that the correct key/value is in the controller context's route data for the ActionFilter to perform its filtering properly. Useful for injecting the key/value when the route data doesn't already exist in the request

SuccessfulOnRedirectAttribute ( ) : System

Initializes a new instance of the SuccessfulOnRedirectAttribute class.

SuccessfulOnRedirectAttribute ( string routeDataKey ) : System

Initializes a new instance of the SuccessfulOnRedirectAttribute class.

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

Метод Описание
AddQueryString ( System.Web.Mvc.RedirectToRouteResult result, System.Web.Mvc.ActionExecutedContext filterContext ) : void

Checks if we are using a cookie to store data or just the query string, if using the cookie then passes logic to the base class, otherwise puts the query string value in

CreateCookie ( System.Web.Mvc.ResultExecutedContext filterContext ) : void

Only create the cookie if its specified

GetTempDataKey ( ControllerContext filterContext ) : string

Returns the request id as the temp data key

GetTempDataValue ( ControllerContext filterContext ) : object

Returns the value to be stored in the cookie or query string

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

Метод Описание
GetController ( IController controller ) : IRequiresBackOfficeRequestContext

Gets the BackOfficeController type from the filter context's controller instance

GetValueFromRoute ( ControllerContext controllerContext ) : object

Returns the value to be stored in the cookie or query string

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

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

Checks if we are using a cookie to store data or just the query string, if using the cookie then passes logic to the base class, otherwise puts the query string value in
protected AddQueryString ( System.Web.Mvc.RedirectToRouteResult result, System.Web.Mvc.ActionExecutedContext filterContext ) : void
result System.Web.Mvc.RedirectToRouteResult
filterContext System.Web.Mvc.ActionExecutedContext
Результат void

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

Only create the cookie if its specified
protected CreateCookie ( System.Web.Mvc.ResultExecutedContext filterContext ) : void
filterContext System.Web.Mvc.ResultExecutedContext
Результат void

EnsureRouteData() публичный статический Метод

Utility for ensuring that the correct key/value is in the controller context's route data for the ActionFilter to perform its filtering properly. Useful for injecting the key/value when the route data doesn't already exist in the request
public static EnsureRouteData ( Controller controller, string key, object value ) : void
controller Controller
key string
value object
Результат void

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

Returns the request id as the temp data key
protected GetTempDataKey ( ControllerContext filterContext ) : string
filterContext ControllerContext
Результат string

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

Returns the value to be stored in the cookie or query string
protected GetTempDataValue ( ControllerContext filterContext ) : object
filterContext ControllerContext
Результат object

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

Initializes a new instance of the SuccessfulOnRedirectAttribute class.
public SuccessfulOnRedirectAttribute ( ) : System
Результат System

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

Initializes a new instance of the SuccessfulOnRedirectAttribute class.
public SuccessfulOnRedirectAttribute ( string routeDataKey ) : System
routeDataKey string The route data key.
Результат System