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); } }
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); }
internal static TenantCULocation GetTenantCULocation(string partitionFqdn) { ArgumentValidator.ThrowIfNullOrEmpty("partitionFqdn", partitionFqdn); return(InternalDirectoryRootOrganizationCache.InternalGetTenantCULocation(partitionFqdn)); }