protected virtual SessionStateBehavior GetSessionStateBehavior(RequestContext requestContext) { string controllerName = (string)requestContext.RouteData.Values["controller"]; IControllerFactory controllerFactory = _controllerFactory ?? ControllerBuilder.Current.GetControllerFactory(); return(controllerFactory.GetControllerSessionBehavior(requestContext, controllerName)); }
/// <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)); }
private SessionStateBehavior GetSessionStateBehavior(RequestContext requestContext, string controllerName) { return(_controllerFactory.GetControllerSessionBehavior(requestContext, controllerName)); }