示例#1
0
        protected virtual SessionStateBehavior GetSessionStateBehavior(RequestContext requestContext)
        {
            string             controllerName    = (string)requestContext.RouteData.Values["controller"];
            IControllerFactory controllerFactory = _controllerFactory ?? ControllerBuilder.Current.GetControllerFactory();

            return(controllerFactory.GetControllerSessionBehavior(requestContext, controllerName));
        }
示例#2
0
        /// <summary></summary>
        public SessionStateBehavior GetControllerSessionBehavior(RequestContext requestContext, string controllerName)
        {
            SessionStateBehavior state = _inner.GetControllerSessionBehavior(requestContext, controllerName);

            if (state != SessionStateBehavior.Default)
            {
                return(state);
            }
            return(DefalutBehavior);
        }
        protected virtual SessionStateBehavior GetSessionStateBehavior(RequestContext requestContext)
        {
            string controllerName = (string)requestContext.RouteData.Values["controller"];

            if (string.IsNullOrWhiteSpace(controllerName))
            {
                throw new InvalidOperationException("No Controller");
            }

            IControllerFactory controllerFactory = _controllerFactory ?? ControllerBuilder.Current.GetControllerFactory();

            return(controllerFactory.GetControllerSessionBehavior(requestContext, controllerName));
        }
 public SessionStateBehavior GetControllerSessionBehavior(RequestContext requestContext, string controllerName)
 {
     return(factory.GetControllerSessionBehavior(requestContext, controllerName));
 }
示例#5
0
 private SessionStateBehavior GetSessionStateBehavior(RequestContext requestContext, string controllerName)
 {
     return(_controllerFactory.GetControllerSessionBehavior(requestContext, controllerName));
 }