// Token: 0x06001332 RID: 4914 RVA: 0x000771CC File Offset: 0x000753CC internal static void LookupExperiencesForRequest(OwaContext owaContext, bool isOptimizedForAccessibility, bool isRichClientFeatureEnabled, out BrowserType browserType, out UserAgentParser.UserAgentVersion browserVersion, out Experience[] experiences) { string application = string.Empty; string empty = string.Empty; browserType = BrowserType.Other; browserVersion = default(UserAgentParser.UserAgentVersion); if (isOptimizedForAccessibility || RequestDispatcherUtilities.ShouldDoBasicRegistryLookup(owaContext)) { UserAgentParser.Parse(string.Empty, out application, out browserVersion, out empty); } else { UserAgentParser.Parse(owaContext.HttpContext.Request.UserAgent, out application, out browserVersion, out empty); } browserType = Utilities.GetBrowserType(owaContext.HttpContext.Request.UserAgent); if (browserType == BrowserType.Other) { application = "Safari"; browserVersion = new UserAgentParser.UserAgentVersion(3, 0, 0); empty = string.Empty; browserType = BrowserType.Safari; } experiences = FormsRegistryManager.LookupExperiences(application, browserVersion, empty, ClientControl.None, isRichClientFeatureEnabled); }
// Token: 0x06001331 RID: 4913 RVA: 0x0007713C File Offset: 0x0007533C internal static FormValue DoFormsRegistryLookup(Experience[] experiences, ulong segmentationFlags, ApplicationElement applicationElement, string type, string action, string state) { ExTraceGlobals.CoreCallTracer.TraceDebug(0L, "RequestDispatcher.DoFormsRegistryLookup"); if (type == null) { type = string.Empty; } if (state == null) { state = string.Empty; } if (action == null) { action = string.Empty; } FormKey formKey = new FormKey(applicationElement, type, action, state); FormValue formValue = FormsRegistryManager.LookupForm(formKey, experiences); if (formValue == null) { return(null); } if ((formValue.SegmentationFlags & segmentationFlags) != formValue.SegmentationFlags) { formKey.Action = action; formKey.State = state; formKey.Class = "Disabled"; formValue = FormsRegistryManager.LookupForm(formKey, experiences); } if (formValue == null) { return(null); } return(formValue); }
public static FormValue LookupForm(FormKey formKey, Experience[] experiences) { ExTraceGlobals.FormsRegistryCallTracer.TraceDebug <FormKey>(0L, "FormsRegistryManager.LookupForm key = {0}", formKey); if (experiences == null) { throw new ArgumentNullException("experiences", "There must be at least one experience provided"); } if (experiences.Length == 0) { throw new ArgumentOutOfRangeException("experiences", "There must be at least one experience provided"); } FormValue formValue = FormsRegistryManager.LookupFormInExperiences(formKey, experiences); if (formValue == null) { ExTraceGlobals.FormsRegistryTracer.TraceDebug(0L, "Downgrading state to wildcard"); formKey.State = string.Empty; formValue = FormsRegistryManager.LookupFormInExperiences(formKey, experiences); if (formValue == null) { ExTraceGlobals.FormsRegistryTracer.TraceDebug(0L, "Downgrading action to wildcard"); string action = formKey.Action; formKey.Action = string.Empty; formValue = FormsRegistryManager.LookupFormInExperiences(formKey, experiences); if (formValue == null) { ExTraceGlobals.FormsRegistryTracer.TraceDebug(0L, "Downgrading class to wildcard"); formKey.Class = string.Empty; formKey.Action = action; ExTraceGlobals.FormsRegistryTracer.TraceDebug(0L, "Restoring action"); formValue = FormsRegistryManager.LookupFormInExperiences(formKey, experiences); if (formValue == null) { formKey.Action = string.Empty; ExTraceGlobals.FormsRegistryTracer.TraceDebug(0L, "Downgrading action to wildcard"); formValue = FormsRegistryManager.LookupFormInExperiences(formKey, experiences); } } } } return(formValue); }
internal void ExecuteApplicationStart(object sender, EventArgs e) { ExTraceGlobals.CoreCallTracer.TraceDebug(0L, "Global.Application_Start"); try { if (OwaApplicationBase.IsRunningDfpowa) { string localPath = new Uri(Assembly.GetExecutingAssembly().CodeBase).LocalPath; DirectoryInfo[] directories = Directory.GetParent(Directory.GetParent(localPath).FullName).GetDirectories("Config"); if (directories.Length > 0) { VariantConfiguration.Initialize(directories[0].FullName); } } Globals.Initialize(this.OwaVDirType); Kerberos.FlushTicketCache(); SmallIconManager.Initialize(); ThemeManager.Initialize(); FormsRegistryManager.Initialize(HttpRuntime.AppDomainAppPath); ADCustomPropertyParser.Initialize(HttpRuntime.AppDomainAppPath); PerformanceCounterManager.InitializePerformanceCounters(); ProxyEventHandler.Initialize(); ExRpcModule.Bind(); UIExtensionManager.Initialize(); HelpProvider.Initialize(HelpProvider.HelpAppName.Owa); this.ExecuteApplicationSpecificStart(); } catch (OwaSmallIconManagerInitializationException initializationError) { ExTraceGlobals.CoreTracer.TraceDebug(0L, "Application initialization failed"); Globals.InitializationError = initializationError; return; } catch (OwaThemeManagerInitializationException initializationError2) { ExTraceGlobals.CoreTracer.TraceDebug(0L, "Application initialization failed"); Globals.InitializationError = initializationError2; return; } catch (OwaFormsRegistryInitializationException initializationError3) { ExTraceGlobals.CoreTracer.TraceDebug(0L, "Application initialization failed"); Globals.InitializationError = initializationError3; return; } catch (OwaInvalidConfigurationException ex) { ExTraceGlobals.CoreTracer.TraceDebug(0L, "Application initialization failed because of a problem with configuration: " + ex.Message); Globals.InitializationError = ex; return; } catch (OwaWin32Exception ex2) { ExTraceGlobals.CoreTracer.TraceDebug <int>(0L, "Application initialization failed with a win32 error: {0}", ex2.LastError); Globals.InitializationError = ex2; return; } catch (Exception initializationError4) { ExTraceGlobals.CoreTracer.TraceDebug(0L, "Application initialization failed"); Globals.InitializationError = initializationError4; throw; } Globals.IsInitialized = true; ExTraceGlobals.CoreTracer.TraceDebug(0L, "Application initialization succeeded"); if (Globals.IsPreCheckinApp) { OwaDiagnostics.Logger.LogEvent(ClientsEventLogConstants.Tuple_DfpOwaStartedSuccessfully, string.Empty, new object[0]); return; } OwaDiagnostics.Logger.LogEvent(ClientsEventLogConstants.Tuple_OwaStartedSuccessfully, string.Empty, new object[0]); }