Exemplo n.º 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);
     }
 }
Exemplo n.º 2
0
 internal static void PopulateCache(string partitionFqdn, Organization rootOrganization)
 {
     ArgumentValidator.ThrowIfNullOrEmpty("partitionFqdn", partitionFqdn);
     ArgumentValidator.ThrowIfNull("organization", rootOrganization);
     if (InternalDirectoryRootOrganizationCache.InternalGetTenantCULocation(partitionFqdn) == TenantCULocation.Undefined)
     {
         TenantCULocation value;
         if (Globals.IsDatacenter)
         {
             value = ((rootOrganization.ForestMode == ForestModeFlags.Legacy) ? TenantCULocation.ConfigNC : TenantCULocation.DomainNC);
         }
         else
         {
             value = TenantCULocation.ConfigNC;
         }
         InternalDirectoryRootOrganizationCache.tenantCULocations.TryAdd(partitionFqdn, value);
     }
     InternalDirectoryRootOrganizationCache.rootOrgContainerIds.TryAdd(partitionFqdn, new ADObjectIdCachableItem(rootOrganization.Id));
     ForestTenantRelocationsCache.UpdateTenantRelocationAllowedValue(rootOrganization);
 }
Exemplo n.º 3
0
 internal static TenantCULocation GetTenantCULocation(string partitionFqdn)
 {
     ArgumentValidator.ThrowIfNullOrEmpty("partitionFqdn", partitionFqdn);
     return(InternalDirectoryRootOrganizationCache.InternalGetTenantCULocation(partitionFqdn));
 }