Ejemplo n.º 1
0
        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));
        }
Ejemplo n.º 2
0
        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));
        }
Ejemplo n.º 3
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);
        }