public IAsyncResult BeginDomainExists(SmtpDomain domain, Namespace[] ns, AsyncCallback callback, object asyncState) { FindDomainRequest findDomainRequest = LocatorServiceClientReader.ConstructDomainExistsRequest(domain, ns, this.glsReadFlag); LocatorService locatorService = this.AcquireServiceProxy(); IAsyncResult internalAsyncResult = locatorService.BeginFindDomain(this.requestIdentity, findDomainRequest, new AsyncCallback(LocatorServiceClientAdapter.OnWebServiceRequestCompleted), new GlsAsyncState(callback, asyncState, locatorService)); return(new GlsAsyncResult(callback, asyncState, locatorService, internalAsyncResult)); }
public IAsyncResult BeginFindDomains(SmtpDomain[] domains, DomainProperty[] domainProperties, TenantProperty[] tenantProperties, AsyncCallback callback, object asyncState) { FindDomainsRequest findDomainsRequest = LocatorServiceClientReader.ConstructFindDomainsRequest(domains, domainProperties, tenantProperties, this.glsReadFlag); LocatorService locatorService = this.AcquireServiceProxy(); IAsyncResult internalAsyncResult = locatorService.BeginFindDomains(this.requestIdentity, findDomainsRequest, new AsyncCallback(LocatorServiceClientAdapter.OnWebServiceRequestCompleted), new GlsAsyncState(callback, asyncState, locatorService)); return(new GlsAsyncResult(callback, asyncState, locatorService, internalAsyncResult)); }
public FindDomainsResult FindDomains(SmtpDomain[] domains, DomainProperty[] domainProperties, TenantProperty[] tenantProperties) { FindDomainsRequest request = LocatorServiceClientReader.ConstructFindDomainsRequest(domains, domainProperties, tenantProperties, this.glsReadFlag); LocatorService proxy = this.AcquireServiceProxy(); FindDomainsResponse response = GLSLogger.LoggingWrapper <FindDomainsResponse>(this, domains[0].ToString(), proxy.GetHashCode().ToString(), () => proxy.FindDomains(this.requestIdentity, request)); base.ReleaseServiceProxy(proxy); return(LocatorServiceClientReader.ConstructFindDomainsResult(response)); }
public bool DomainExists(SmtpDomain domain, Namespace[] ns) { FindDomainRequest request = LocatorServiceClientReader.ConstructDomainExistsRequest(domain, ns, this.glsReadFlag); LocatorService proxy = this.AcquireServiceProxy(); FindDomainResponse findDomainResponse = GLSLogger.LoggingWrapper <FindDomainResponse>(this, domain.ToString(), proxy.GetHashCode().ToString(), () => proxy.FindDomain(this.requestIdentity, request)); base.ReleaseServiceProxy(proxy); return(findDomainResponse.DomainInfo != null); }
public bool TenantExists(Guid tenantId, Namespace[] ns) { FindTenantRequest request = LocatorServiceClientReader.ConstructTenantExistsRequest(tenantId, ns, this.glsReadFlag); LocatorService proxy = this.AcquireServiceProxy(); FindTenantResponse findTenantResponse = GLSLogger.LoggingWrapper <FindTenantResponse>(this, tenantId.ToString(), proxy.GetHashCode().ToString(), () => proxy.FindTenant(this.requestIdentity, request)); base.ReleaseServiceProxy(proxy); return(findTenantResponse.TenantInfo != null); }
public FindDomainsResult EndFindDomains(IAsyncResult externalAR) { GlsAsyncResult glsAsyncResult = (GlsAsyncResult)externalAR; FindDomainsResponse response = glsAsyncResult.ServiceProxy.EndFindDomains(glsAsyncResult.InternalAsyncResult); base.ReleaseServiceProxy(glsAsyncResult.ServiceProxy); glsAsyncResult.Dispose(); return(LocatorServiceClientReader.ConstructFindDomainsResult(response)); }
internal static FindDomainsResult ConstructFindDomainsResult(FindDomainsResponse response) { FindDomainResult[] findDomainResults = new FindDomainResult[0]; if (response.DomainsResponse != null) { findDomainResults = (from findDomainResponse in response.DomainsResponse select LocatorServiceClientReader.ConstructFindDomainResult(findDomainResponse)).ToArray <FindDomainResult>(); } return(new FindDomainsResult(findDomainResults)); }
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); }
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) } }); }
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) } }); }
internal static FindDomainResult ConstructFindDomainResult(FindDomainResponse response) { IDictionary <DomainProperty, PropertyValue> domainProperties = (response.DomainInfo != null && response.DomainInfo.Properties != null) ? LocatorServiceClientReader.ConstructDomainPropertyDictionary(response.DomainInfo.Properties) : new Dictionary <DomainProperty, PropertyValue>(); IDictionary <TenantProperty, PropertyValue> tenantProperties = (response.TenantInfo != null && response.TenantInfo.Properties != null) ? LocatorServiceClientReader.ConstructTenantPropertyDictionary(response.TenantInfo.Properties) : new Dictionary <TenantProperty, PropertyValue>(); Guid tenantId = (response.TenantInfo != null) ? response.TenantInfo.TenantId : Guid.Empty; return(new FindDomainResult((response.DomainInfo == null) ? null : response.DomainInfo.DomainName, tenantId, tenantProperties, domainProperties)); }
internal static FindTenantResult ConstructFindTenantResult(FindTenantResponse response) { IDictionary <TenantProperty, PropertyValue> properties = (response.TenantInfo != null) ? LocatorServiceClientReader.ConstructTenantPropertyDictionary(response.TenantInfo.Properties) : new Dictionary <TenantProperty, PropertyValue>(); return(new FindTenantResult(properties)); }