// Token: 0x0600116D RID: 4461 RVA: 0x00053DF8 File Offset: 0x00051FF8
        public static ExchangeConfigurationUnit[] LoadSharedConfigurationsSorted(OrganizationId orgId)
        {
            if (orgId.Equals(OrganizationId.ForestWideOrgId))
            {
                return(null);
            }
            ITenantConfigurationSession tenantConfigurationSession = DirectorySessionFactory.Default.CreateTenantConfigurationSession(ConsistencyMode.PartiallyConsistent, ADSessionSettings.FromAllTenantsPartitionId(orgId.PartitionId), 151, "LoadSharedConfigurationsSorted", "f:\\15.00.1497\\sources\\dev\\data\\src\\directory\\SharedConfiguration.cs");

            ExchangeConfigurationUnit[] array = tenantConfigurationSession.FindSharedConfigurationByOrganizationId(orgId);
            if (array.Length > 1)
            {
                Array.Sort <ExchangeConfigurationUnit>(array, new Comparison <ExchangeConfigurationUnit>(SharedConfiguration.CompareBySharedConfigurationInfo));
            }
            return(array);
        }
Exemplo n.º 2
0
 public static TenantPartitionHint FromOrganizationId(OrganizationId orgId)
 {
     if (orgId == null)
     {
         throw new ArgumentNullException("orgId");
     }
     if (orgId.Equals(OrganizationId.ForestWideOrgId))
     {
         return(new TenantPartitionHint(orgId.PartitionId, TenantPartitionHint.TenantNameForRootOrg));
     }
     if (orgId.PartitionId == null || orgId.OrganizationalUnit == null)
     {
         throw new ArgumentNullException("PartitionId");
     }
     return(new TenantPartitionHint(orgId.PartitionId, orgId.OrganizationalUnit.Name));
 }
Exemplo n.º 3
0
 private ADSessionSettings(ScopeSet scopeSet, ADObjectId rootOrgId, OrganizationId currentOrganizationId, OrganizationId executingUserOrganizationId, ConfigScopes configScopes, PartitionId partitionId)
 {
     if (scopeSet == null)
     {
         throw new ArgumentNullException("scopeSet");
     }
     if (null == currentOrganizationId)
     {
         throw new ArgumentNullException("currentOrganizationId");
     }
     if (executingUserOrganizationId != null && !executingUserOrganizationId.Equals(OrganizationId.ForestWideOrgId) && !executingUserOrganizationId.Equals(currentOrganizationId) && !currentOrganizationId.OrganizationalUnit.IsDescendantOf(executingUserOrganizationId.OrganizationalUnit))
     {
         throw new ArgumentException(DirectoryStrings.ErrorInvalidExecutingOrg(executingUserOrganizationId.OrganizationalUnit.DistinguishedName, currentOrganizationId.OrganizationalUnit.DistinguishedName));
     }
     if (partitionId == null)
     {
         throw new ArgumentNullException("partitionId");
     }
     this.scopeSet                    = scopeSet;
     this.preferredServers            = new SimpleServerSettings();
     this.rootOrgId                   = rootOrgId;
     this.currentOrganizationId       = currentOrganizationId;
     this.executingUserOrganizationId = executingUserOrganizationId;
     this.configScopes                = configScopes;
     this.partitionId                 = partitionId;
     this.tenantConsistencyMode       = ((configScopes == ConfigScopes.AllTenants) ? TenantConsistencyMode.IgnoreRetiredTenants : TenantConsistencyMode.ExpectOnlyLiveTenants);
     if (!ADGlobalConfigSettings.SoftLinkEnabled || this.PartitionId == null || this.PartitionId.IsLocalForestPartition() || ADSessionSettings.IsForefrontObject(this.PartitionId))
     {
         this.PartitionSoftLinkMode = SoftLinkMode.Disabled;
         return;
     }
     if (this.PartitionId.ForestFQDN.EndsWith(TopologyProvider.LocalForestFqdn, StringComparison.OrdinalIgnoreCase))
     {
         this.PartitionSoftLinkMode = SoftLinkMode.Disabled;
         return;
     }
     if (this.ConfigScopes == ConfigScopes.Database || this.ConfigScopes == ConfigScopes.Server || this.ConfigScopes == ConfigScopes.RootOrg)
     {
         this.PartitionSoftLinkMode = SoftLinkMode.Disabled;
         return;
     }
     this.PartitionSoftLinkMode = SoftLinkMode.DualMatch;
 }