public override void OnActionExecuting(ActionExecutingContext filterContext)
        {
            if (filterContext.IsChildAction)
            {
                return;
            }

            if (filterContext.HttpContext.Request.HttpMethod != "GET")
            {
                return;
            }

            if (Clear)
            {
                StateManager.RemoveState(SessionProvider.SessionId);
            }

            if (Manual)
            {
                return;
            }

            var state = StateManager.GetState(SessionProvider.SessionId);

            state.Push(filterContext, Label, ResourceType);
        }
Example #2
0
 public static void Clear()
 {
     StateManager.RemoveState(SessionProvider.SessionId);
 }