Atomia.Web.Plugin.PublicOrder.GeneralItems.GlobalEventsHandler.Application_PreRequestHandlerExecute C# (CSharp) Метод

Application_PreRequestHandlerExecute() публичный Метод

Handles the PreRequestHandlerExecute event of the Application control.
public Application_PreRequestHandlerExecute ( object sender, EventArgs e ) : void
sender object The source of the event.
e System.EventArgs The instance containing the event data.
Результат void
        public override void Application_PreRequestHandlerExecute(object sender, EventArgs e)
        {
            if (HttpContext.Current != null && HttpContext.Current.Request.Params.AllKeys.Any(item => item == "theme"))
            {
                if (AppConfig.Instance.ThemesList.Cast<Theme>().Any(theme => theme.Name.Trim() == HttpContext.Current.Request.Params["theme"].Trim()))
                {
                    if (HttpContext.Current.Session != null)
                    {
                        HttpContext.Current.Session["Theme"] = HttpContext.Current.Request.Params["theme"];
                    }
                }
            }
        }