Exemple #1
0
        public void ProcessRequest(HttpContext context)
        {
            SettingsExposeMode mode = _settingProvider.GetExposeMode();
            string             settingsJsonString = _settingsSerializer.Serialize(mode);

            if (!string.IsNullOrEmpty(settingsJsonString))
            {
                context.Response.Clear();
                context.Response.ContentType = "text/javascript";
                string userDefinedNamespaceScript = GetUserDefinedNamespaceScript();
                string js = string.Format(ScriptTemplate, String.IsNullOrEmpty(userDefinedNamespaceScript) ? DefaultNamespaceScript : userDefinedNamespaceScript, settingsJsonString);
                context.Response.Write(js);
                context.Response.End();
            }
        }