public override void OnActionExecuting(ActionExecutingContext filterContext) { if (filterContext == null) { throw new ArgumentNullException("filterContext"); } var ctx = filterContext.HttpContext; var theme = Default; if (!string.IsNullOrEmpty(ParamName)) { var th = new RequestPersonalizationParameter <string>(ParamName); if (th.LoadFromString(ctx.Request.QueryString[ParamName])) { th.Cache(); } else { th.LoadFromCache(); } theme = th.Value ?? Default; } ctx.UpdateTheme(theme); }
public override void OnActionExecuting(ActionExecutingContext filterContext) { if (filterContext == null) throw new ArgumentNullException("filterContext"); var ctx = filterContext.HttpContext; var theme = Default; if (!string.IsNullOrEmpty(ParamName)) { var th = new RequestPersonalizationParameter<string>(ParamName); if (th.LoadFromString(ctx.Request.QueryString[ParamName])) { th.Cache(); } else { th.LoadFromCache(); } theme = th.Value ?? Default; } ctx.UpdateTheme(theme); }