示例#1
0
        internal static FindDomainsRequest ConstructFindDomainsRequest(IEnumerable <SmtpDomain> domains, DomainProperty[] domainProperties, TenantProperty[] tenantProperties, GlsAPIReadFlag readFlag)
        {
            LocatorServiceClientAdapter.ThrowIfNull(domains, "domains");
            LocatorServiceClientAdapter.ThrowIfNull(domainProperties, "domainProperties");
            LocatorServiceClientAdapter.ThrowIfNull(tenantProperties, "tenantProperties");
            FindDomainsRequest findDomainsRequest = new FindDomainsRequest();

            findDomainsRequest.ReadFlag    = (int)readFlag;
            findDomainsRequest.DomainsName = (from domain in domains
                                              select domain.Domain).ToArray <string>();
            findDomainsRequest.DomainPropertyNames = LocatorServiceClientReader.GetPropertyNames(domainProperties);
            findDomainsRequest.TenantPropertyNames = LocatorServiceClientReader.GetPropertyNames(tenantProperties);
            return(findDomainsRequest);
        }
示例#2
0
 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)
         }
     });
 }
示例#3
0
        internal static FindDomainRequest ConstructDomainExistsRequest(SmtpDomain domain, Namespace[] ns, GlsAPIReadFlag readFlag)
        {
            LocatorServiceClientAdapter.ThrowIfNull(domain, "domain");
            LocatorServiceClientAdapter.ThrowIfInvalidNamespace(ns);
            FindDomainRequest findDomainRequest = new FindDomainRequest();

            findDomainRequest.ReadFlag = (int)readFlag;
            string[] propertyNames = (from item in ns
                                      select NamespaceUtil.NamespaceWildcard(item)).ToArray <string>();
            findDomainRequest.Domain = new DomainQuery
            {
                DomainName    = domain.Domain,
                PropertyNames = propertyNames
            };
            return(findDomainRequest);
        }
示例#4
0
 internal static FindDomainRequest ConstructFindDomainRequest(SmtpDomain domain, DomainProperty[] domainProperties, TenantProperty[] tenantProperties, GlsAPIReadFlag readFlag)
 {
     LocatorServiceClientAdapter.ThrowIfNull(domain, "domain");
     LocatorServiceClientAdapter.ThrowIfNull(domainProperties, "domainProperties");
     LocatorServiceClientAdapter.ThrowIfNull(tenantProperties, "tenantProperties");
     return(new FindDomainRequest
     {
         ReadFlag = (int)readFlag,
         Domain = new DomainQuery
         {
             DomainName = domain.Domain,
             PropertyNames = LocatorServiceClientReader.GetPropertyNames(domainProperties)
         },
         Tenant = new TenantQuery
         {
             PropertyNames = LocatorServiceClientReader.GetPropertyNames(tenantProperties)
         }
     });
 }
 // 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)
         }
     });
 }