public PageContext(HttpContext context, string owaVersion)
 {
     this.UserAgent = OwaUserAgentUtilities.CreateUserAgentWithLayoutOverride(context);
     this.IsAppCacheEnabledClient = (context == null || context.Request.QueryString["appcacheclient"] == "1");
     this.ManifestType            = (DefaultPageBase.IsPalEnabled(context, this.UserAgent.RawString) ? SlabManifestType.Pal : SlabManifestType.Standard);
     this.Theme = ThemeManagerFactory.GetInstance(owaVersion).GetThemeFolderName(this.UserAgent, context);
 }
Esempio n. 2
0
        protected virtual bool GetIsClientAppCacheEnabled(HttpContext context)
        {
            bool flag = false;
            NameValueCollection nameValueCollection = HttpUtility.ParseQueryString(context.Request.Url.Query);

            foreach (string text in nameValueCollection.AllKeys)
            {
                string text2;
                if (text == null || !DefaultPageBase.ParamsInAppCache.TryGetValue(text.ToLowerInvariant(), out text2) || (text2 != null && text2 != context.Request.Params[text]))
                {
                    flag = true;
                    break;
                }
            }
            return((!flag && OfflineClientRequestUtilities.IsRequestForAppCachedVersion(context)) || DefaultPageBase.IsPalEnabled(context, this.UserAgent.RawString));
        }
Esempio n. 3
0
 public static bool IsPalEnabled(HttpContext context)
 {
     return(DefaultPageBase.IsPalEnabled(context, context.Request.UserAgent));
 }