internal static FindTenantRequest ConstructFindTenantRequest(Guid tenantId, TenantProperty[] tenantProperties, GlsAPIReadFlag readFlag) { LocatorServiceClientAdapter.ThrowIfEmptyGuid(tenantId, "tenantId"); LocatorServiceClientAdapter.ThrowIfNull(tenantProperties, "tenantProperties"); return(new FindTenantRequest { ReadFlag = (int)readFlag, Tenant = new TenantQuery { TenantId = tenantId, PropertyNames = LocatorServiceClientReader.GetPropertyNames(tenantProperties) } }); }
// Token: 0x06000C58 RID: 3160 RVA: 0x00037F3C File Offset: 0x0003613C internal static DeleteTenantRequest ConstructDeleteTenantRequest(Guid tenantId, Namespace ns) { LocatorServiceClientAdapter.ThrowIfEmptyGuid(tenantId, "tenantId"); LocatorServiceClientAdapter.ThrowIfInvalidNamespace(ns); return(new DeleteTenantRequest { Tenant = new TenantQuery { TenantId = tenantId, PropertyNames = new string[] { NamespaceUtil.NamespaceWildcard(ns) } } }); }
internal static FindTenantRequest ConstructTenantExistsRequest(Guid tenantId, Namespace[] ns, GlsAPIReadFlag readFlag) { LocatorServiceClientAdapter.ThrowIfEmptyGuid(tenantId, "tenantId"); LocatorServiceClientAdapter.ThrowIfInvalidNamespace(ns); FindTenantRequest findTenantRequest = new FindTenantRequest(); findTenantRequest.ReadFlag = (int)readFlag; string[] propertyNames = (from item in ns select NamespaceUtil.NamespaceWildcard(item)).ToArray <string>(); findTenantRequest.Tenant = new TenantQuery { TenantId = tenantId, PropertyNames = propertyNames }; return(findTenantRequest); }
// Token: 0x06000C56 RID: 3158 RVA: 0x00037DE4 File Offset: 0x00035FE4 internal static SaveTenantRequest ConstructSaveTenantRequest(Guid tenantId, KeyValuePair <TenantProperty, PropertyValue>[] properties) { LocatorServiceClientAdapter.ThrowIfEmptyGuid(tenantId, "tenantId"); LocatorServiceClientAdapter.ThrowIfNull(properties, "properties"); foreach (KeyValuePair <TenantProperty, PropertyValue> keyValuePair in properties) { if (keyValuePair.Key.DataType != keyValuePair.Value.DataType) { throw new ArgumentException("key and value have different data types!", "properties"); } } return(new SaveTenantRequest { TenantInfo = new TenantInfo { TenantId = tenantId, Properties = LocatorServiceClientWriter.GetPropertyValues(properties) } }); }
// Token: 0x06000C5A RID: 3162 RVA: 0x00037F98 File Offset: 0x00036198 internal static DeleteDomainRequest ConstructDeleteDomainRequest(SmtpDomain domain, Guid tenantId, Namespace ns, bool skipTenantCheck) { LocatorServiceClientAdapter.ThrowIfNull(domain, "domain"); if (!skipTenantCheck) { LocatorServiceClientAdapter.ThrowIfEmptyGuid(tenantId, "tenantId"); } LocatorServiceClientAdapter.ThrowIfInvalidNamespace(ns); return(new DeleteDomainRequest { TenantId = tenantId, Domain = new DomainQuery { DomainName = domain.Domain, PropertyNames = new string[] { NamespaceUtil.NamespaceWildcard(ns) } } }); }
// Token: 0x06000C57 RID: 3159 RVA: 0x00037E80 File Offset: 0x00036080 internal static SaveDomainRequest ConstructSaveDomainRequest(SmtpDomain domain, string domainKey, Guid tenantId, KeyValuePair <DomainProperty, PropertyValue>[] properties) { LocatorServiceClientAdapter.ThrowIfEmptyGuid(tenantId, "tenantId"); LocatorServiceClientAdapter.ThrowIfNull(domain, "domain"); LocatorServiceClientAdapter.ThrowIfNull(properties, "properties"); foreach (KeyValuePair <DomainProperty, PropertyValue> keyValuePair in properties) { if (keyValuePair.Key.DataType != keyValuePair.Value.DataType) { throw new ArgumentException("key and value have different data types!", "properties"); } } return(new SaveDomainRequest { TenantId = tenantId, DomainInfo = new DomainInfo { DomainName = domain.Domain, DomainKey = domainKey, Properties = LocatorServiceClientWriter.GetPropertyValues(properties) } }); }