コード例 #1
0
        public static bool CanInlineScripts(this AjaxHelper ajaxHelper)
        {
            if (ajaxHelper == null)
            {
                throw new ArgumentNullException("ajaxHelper");
            }

            SharpenSection configSection = SharpenSection.GetSettings();

            if (String.IsNullOrEmpty(configSection.ClientScriptStorageCookie) == false)
            {
                return(ScriptInliner.SupportsLocalStorage(ajaxHelper.ViewContext.HttpContext));
            }

            return(false);
        }
コード例 #2
0
 public static string GetInlinedScriptsCookie(this AjaxHelper ajaxHelper)
 {
     return(SharpenSection.GetSettings().ClientScriptStorageCookie);
 }