C# 클래스 Rebel.Cms.Web.Mvc.ActionFilters.AbstractTempDataCookieFilter

An abstract ActionFilter used to store temporary cookie data that is only persisted for one redirect
상속: System.Web.Mvc.ActionFilterAttribute
파일 보기 프로젝트 열기: RebelCMS/rebelcmsxu5

공개 메소드들

메소드 설명
OnActionExecuted ( System.Web.Mvc.ActionExecutedContext filterContext ) : void

Checks the result type, if it is a RedirectToRouteResult it calls the abstract OnRedirect method otherwise if its a view result calls the abstract OnView method.

OnActionExecuting ( System.Web.Mvc.ActionExecutingContext filterContext ) : void

Clears out all cookies starting with the prefix

Generally these cookies will be cleared out on the client side but just in case this will help ensure that we don't leave residule cookes laying around, even though we've already set them to expire in a minute... better safe than sorry

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

Writes the notifications cookie

보호된 메소드들

메소드 설명
AddQueryString ( System.Web.Mvc.RedirectToRouteResult result, System.Web.Mvc.ActionExecutedContext filterContext ) : void

Adds the query string name with the temp data key to QueryStrings

AddViewData ( System.Web.Mvc.ViewResult result, System.Web.Mvc.ActionExecutedContext filterContext ) : void

Adds the query string name with the temp data key to ViewData

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

Creates the cookie

GetTempDataKey ( ControllerContext filterContext ) : string

Returns the key used to reference the cookie temp data

GetTempDataValue ( ControllerContext filterContext ) : object

Returns the value to be stored in the cookie

메소드 상세

AddQueryString() 보호된 메소드

Adds the query string name with the temp data key to QueryStrings
protected AddQueryString ( System.Web.Mvc.RedirectToRouteResult result, System.Web.Mvc.ActionExecutedContext filterContext ) : void
result System.Web.Mvc.RedirectToRouteResult
filterContext System.Web.Mvc.ActionExecutedContext
리턴 void

AddViewData() 보호된 메소드

Adds the query string name with the temp data key to ViewData
protected AddViewData ( System.Web.Mvc.ViewResult result, System.Web.Mvc.ActionExecutedContext filterContext ) : void
result System.Web.Mvc.ViewResult
filterContext System.Web.Mvc.ActionExecutedContext
리턴 void

CreateCookie() 보호된 메소드

Creates the cookie
protected CreateCookie ( System.Web.Mvc.ResultExecutedContext filterContext ) : void
filterContext System.Web.Mvc.ResultExecutedContext
리턴 void

GetTempDataKey() 보호된 추상적인 메소드

Returns the key used to reference the cookie temp data
protected abstract GetTempDataKey ( ControllerContext filterContext ) : string
filterContext ControllerContext
리턴 string

GetTempDataValue() 보호된 추상적인 메소드

Returns the value to be stored in the cookie
protected abstract GetTempDataValue ( ControllerContext filterContext ) : object
filterContext ControllerContext
리턴 object

OnActionExecuted() 공개 메소드

Checks the result type, if it is a RedirectToRouteResult it calls the abstract OnRedirect method otherwise if its a view result calls the abstract OnView method.
public OnActionExecuted ( System.Web.Mvc.ActionExecutedContext filterContext ) : void
filterContext System.Web.Mvc.ActionExecutedContext
리턴 void

OnActionExecuting() 공개 메소드

Clears out all cookies starting with the prefix
Generally these cookies will be cleared out on the client side but just in case this will help ensure that we don't leave residule cookes laying around, even though we've already set them to expire in a minute... better safe than sorry
public OnActionExecuting ( System.Web.Mvc.ActionExecutingContext filterContext ) : void
filterContext System.Web.Mvc.ActionExecutingContext
리턴 void

OnResultExecuted() 공개 메소드

Writes the notifications cookie
public OnResultExecuted ( System.Web.Mvc.ResultExecutedContext filterContext ) : void
filterContext System.Web.Mvc.ResultExecutedContext
리턴 void