// Token: 0x0600061B RID: 1563 RVA: 0x000211EC File Offset: 0x0001F3EC internal static bool UseAggregateSession(ADSessionSettings sessionSettings) { ADServerSettings externalServerSettings = ADSessionSettings.ExternalServerSettings; ADDriverContext processADContext = ADSessionSettings.GetProcessADContext(); bool flag = processADContext != null && processADContext.Mode == ContextMode.Setup; bool flag2 = externalServerSettings != null && externalServerSettings.ForceADInTemplateScope; bool flag3 = !ConfigBase <AdDriverConfigSchema> .GetConfig <bool>("ConsumerMailboxScenarioDisabled"); return(flag3 && TemplateTenantConfiguration.IsTemplateTenant(sessionSettings.CurrentOrganizationId) && !sessionSettings.ForceADInTemplateScope && !flag2 && !flag); }
internal static void SetThreadADContext(ADDriverContext context) { if (context == null) { throw new ArgumentNullException("context"); } if (context.Mode != ContextMode.Cmdlet && context.Mode != ContextMode.Test && context.Mode != ContextMode.TopologyService) { throw new ArgumentException("Only Cmdlet, Test and Topology Service context modes are supported"); } if (context.ServerSettings == null) { throw new ArgumentException("context.ServerSettings cannot be null"); } ADSessionSettings.threadContext = context; }
internal static void SetProcessADContext(ADDriverContext context) { if (context == null) { throw new ArgumentNullException("context"); } if (context.Mode != ContextMode.Setup && context.Mode != ContextMode.Test && context.Mode != ContextMode.TopologyService) { throw new ArgumentException("Only Setup,Test context and Topology Service modes are supported"); } if (context.ServerSettings == null) { throw new ArgumentException("context.ServerSettings cannot be null"); } if (context.Mode != ContextMode.TopologyService && TopologyProvider.CurrentTopologyMode != TopologyMode.Ldap) { throw new InvalidOperationException(DirectoryStrings.ExceptionSetPreferredDCsOnlyForManagement); } ADSessionSettings.processContext = context; ADSessionSettings.LogEventProcessADContextChanged(); }