protected virtual bool ShouldRedirectWithoutUnnecessaryParams(out string destinationUrl) { destinationUrl = null; string uriString = this.Context.Request.Url.OriginalString; string text = this.Context.Request.Headers["msExchProxyUri"]; if (!string.IsNullOrEmpty(text)) { uriString = text; } Uri uri = new Uri(uriString); NameValueCollection coll = HttpUtility.ParseQueryString(uri.Query); string str = null; if (DefaultPageBase.QueryHasUnnecessaryParameters(coll, out str)) { string text2 = uri.AbsolutePath; if (text2.ToLowerInvariant().EndsWith("default.aspx")) { text2 = text2.Substring(0, text2.Length - "default.aspx".Length); } text2 += str; destinationUrl = text2; return(true); } return(false); }
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); }
protected virtual bool CalculateCompositeSessionDataEnabled() { bool result = false; if (this.IsAppCacheEnabledClient && !this.IsClientInOfflineMode && !DefaultPageBase.IsRecoveryBoot(this.Context)) { UserContext userContext = UserContextManager.GetUserContext(this.Context); result = (userContext != null && userContext.FeaturesManager != null && userContext.FeaturesManager.ServerSettings.OwaCompositeSessionData.Enabled); } return(result); }
protected string InlineFontCss() { string fontLocale = DefaultPageBase.GetFontLocale(); return(this.InlineStyles(string.Format("fabric.font.{0}.css", fontLocale))); }
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)); }
public static bool IsPalEnabled(HttpContext context) { return(DefaultPageBase.IsPalEnabled(context, context.Request.UserAgent)); }