/// <exclude /> public ScriptLoader(string type, string directive = null, bool updateManagerDisabled = false) { _ctx = HttpContext.Current; _type = type; _updateManagerDisabled = updateManagerDisabled; if (directive == "compile") { _mode = CompositeScriptMode.COMPILE; } else if (CookieHandler.Get("mode") == "develop") { _mode = CompositeScriptMode.DEVELOP; } else { _mode = CompositeScriptMode.OPERATE; } string folderPath = Path.Combine(_ctx.Request.PhysicalApplicationPath, "Composite"); switch (type) { case "top": _defaultscripts = ScriptHandler.GetTopScripts(_mode, folderPath); break; case "sub": _defaultscripts = ScriptHandler.GetSubScripts(_mode, folderPath); break; } }
/** * Notice that automatic compression doesn't work! */ protected void Page_Load(object sender, EventArgs e) { if (directive == "compile") { _mode = CompositeScriptMode.COMPILE; } else if (CookieHandler.Get("mode") == "develop") { _mode = CompositeScriptMode.DEVELOP; } else { _mode = CompositeScriptMode.OPERATE; } string folderPath = Path.Combine(HttpContext.Current.Request.PhysicalApplicationPath, "Composite"); switch (type) { case "top": _defaultscripts = ScriptHandler.GetTopScripts(_mode, folderPath); break; case "sub": _defaultscripts = ScriptHandler.GetSubScripts(_mode, folderPath); break; } }
/// <exclude /> public static IEnumerable <string> GetSubScripts(CompositeScriptMode scriptMode, string folderPath) { IEnumerable <string> result = GetStrings("sub", scriptMode.ToString().ToLower(), folderPath); return(result); }
/// <exclude /> public static IEnumerable<string> GetSubScripts(CompositeScriptMode scriptMode, string folderPath) { IEnumerable<string> result = GetStrings("sub", scriptMode.ToString().ToLower(), folderPath); return result; }