Beispiel #1
0
 internal static void InitializeForestModeFlagForSetup(string partitionFqdn, TenantCULocation cuLocation)
 {
     ArgumentValidator.ThrowIfNullOrEmpty("partitionFqdn", partitionFqdn);
     if (cuLocation == TenantCULocation.Undefined)
     {
         throw new ArgumentOutOfRangeException("cuLocation has invalid value");
     }
     if (InternalDirectoryRootOrganizationCache.InternalGetTenantCULocation(partitionFqdn) == TenantCULocation.Undefined)
     {
         InternalDirectoryRootOrganizationCache.tenantCULocations.TryAdd(partitionFqdn, cuLocation);
     }
 }
Beispiel #2
0
        internal static bool IsTenantConfigInDomainNC(string partitionFqdn)
        {
            TenantCULocation tenantCULocation = InternalDirectoryRootOrganizationCache.GetTenantCULocation(partitionFqdn);

            if (tenantCULocation == TenantCULocation.Undefined)
            {
                if (Globals.IsDatacenter)
                {
                    ADSystemConfigurationSession.GetRootOrgContainer(partitionFqdn, null, null);
                    tenantCULocation = InternalDirectoryRootOrganizationCache.GetTenantCULocation(partitionFqdn);
                }
                else
                {
                    tenantCULocation = TenantCULocation.ConfigNC;
                    if (PartitionId.IsLocalForestPartition(partitionFqdn))
                    {
                        InternalDirectoryRootOrganizationCache.InitializeForestModeFlagForSetup(partitionFqdn, tenantCULocation);
                    }
                }
            }
            return(tenantCULocation == TenantCULocation.DomainNC);
        }