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
파일 보기 프로젝트 열기: RebelCMS/rebelcmsxu5

공개 메소드들

메소드 설명
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