Esempio n. 1
0
        private void HandleActions()
        {
            string actionName = Request.QueryString.ToString().ToLower();

            if (actionName == "start")
            {
                Settings.Running = true;
                MiniProfiler.ResumeStorage();
            }
            else if (actionName == "stop")
            {
                Settings.Running = false;
            }
            else if (actionName == "refresh-settings")
            {
                Settings.LoadProfilingConfig();
                MiniProfiler.Prepare();
            }
            else if (actionName == "disable")
            {
                Settings.UpdateEnableStatus(false);
            }
            else if (actionName == "enable")
            {
                Settings.UpdateEnableStatus(true);
            }
            else if (actionName == "clear-log")
            {
                Logger.ClearLog();
            }

            // Refresh and remove query string
            if (actionName != "")
            {
                Response.Redirect(Request.Path);
            }
        }