private static object DatabaseGetter(IPropertyBag propertyBag) { bool flag; MservRecord record = MServRecipientSchema.GetRecord(propertyBag, MservValueFormat.Exo, out flag); if (record == null) { return(null); } string exoForestFqdn = record.ExoForestFqdn; if (!Fqdn.IsValidFqdn(exoForestFqdn)) { throw new DataValidationException(new PropertyValidationError(DirectoryStrings.CannotCalculatePropertyGeneric(MServRecipientSchema.Database.Name), MServRecipientSchema.Database, record)); } Guid guid; try { guid = new Guid(record.ExoDatabaseId); } catch (Exception ex) { throw new DataValidationException(new PropertyValidationError(DirectoryStrings.CannotCalculateProperty(MServRecipientSchema.Database.Name, ex.Message), MServRecipientSchema.Database, record), ex); } return(new ADObjectId(guid, exoForestFqdn)); }
// Token: 0x06000312 RID: 786 RVA: 0x000109A4 File Offset: 0x0000EBA4 internal void ValidatePartitionFqdn(string fqdn) { if (string.IsNullOrEmpty(fqdn)) { throw new ArgumentNullException("fqdn"); } if (!Fqdn.IsValidFqdn(fqdn.Trim())) { throw new ArgumentException(string.Format("Invalid fqdn parameter value: '{0}'", fqdn.Trim())); } if (Datacenter.IsMicrosoftHostedOnly(true) && !Datacenter.IsDatacenterDedicated(true) && !PartitionId.IsLocalForestPartition(fqdn) && !fqdn.EndsWith("outlook.com", StringComparison.OrdinalIgnoreCase) && !fqdn.EndsWith("exchangelabs.com", StringComparison.OrdinalIgnoreCase) && !fqdn.EndsWith("outlook.cn", StringComparison.OrdinalIgnoreCase) && !fqdn.EndsWith("extest.microsoft.com", StringComparison.OrdinalIgnoreCase)) { throw new ArgumentException(DirectoryStrings.InvalidPartitionFqdn(fqdn)); } }
public GlsOverrideCollection(string serializedValue) { this.tenantOverrides = new List <GlobalLocatorServiceTenant>(); if (string.IsNullOrEmpty(serializedValue)) { return; } string[] array = serializedValue.Split(new char[] { ';' }); try { foreach (string text in array) { string[] array3 = text.Split(new char[] { ':' }); if (array3.Length < 5) { throw new FormatException("Parts count"); } GlobalLocatorServiceTenant globalLocatorServiceTenant = new GlobalLocatorServiceTenant(); globalLocatorServiceTenant.ExternalDirectoryOrganizationId = Guid.Parse(array3[0]); globalLocatorServiceTenant.ResourceForest = array3[1]; globalLocatorServiceTenant.AccountForest = array3[2]; globalLocatorServiceTenant.TenantContainerCN = array3[3]; globalLocatorServiceTenant.SmtpNextHopDomain = new SmtpDomain(array3[4]); if (!Fqdn.IsValidFqdn(globalLocatorServiceTenant.ResourceForest)) { throw new ArgumentException("ResourceForest"); } if (!Fqdn.IsValidFqdn(globalLocatorServiceTenant.AccountForest)) { throw new ArgumentException("AccountForest"); } this.tenantOverrides.Add(globalLocatorServiceTenant); } } catch (Exception innerException) { throw new FormatException("Format: '[tenant guid]:[resource forest]:[account forest]:[tenant CN]:[SmtpNextHopDomain];[tenant guid]:[resource forest]:[account forest]:[tenant CN]:[SmtpNextHopDomain]' \r\nExample: '038ea23e-d787-4595-9257-e78aca022e2c:rf1.com:af1.com:tenant1.com:pod50002ehf.exchangelabs.live-int.com;0339d953-85e6-4dbc-b0cf-446464c4ebfc:rf2.com:af2.com:tenant2.com:pod50002ehf.exchangelabs.live-int.com'", innerException); } }