コード例 #1
0
        public FindTenantResult FindTenant(Guid tenantId, TenantProperty[] tenantProperties)
        {
            FindTenantRequest  request  = LocatorServiceClientReader.ConstructFindTenantRequest(tenantId, tenantProperties, this.glsReadFlag);
            LocatorService     proxy    = this.AcquireServiceProxy();
            FindTenantResponse response = GLSLogger.LoggingWrapper <FindTenantResponse>(this, tenantId.ToString(), proxy.GetHashCode().ToString(), () => proxy.FindTenant(this.requestIdentity, request));

            base.ReleaseServiceProxy(proxy);
            return(LocatorServiceClientReader.ConstructFindTenantResult(response));
        }
コード例 #2
0
        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);
        }
コード例 #3
0
        public FindTenantResult EndFindTenant(IAsyncResult externalAR)
        {
            GlsAsyncResult     glsAsyncResult = (GlsAsyncResult)externalAR;
            FindTenantResponse response       = glsAsyncResult.ServiceProxy.EndFindTenant(glsAsyncResult.InternalAsyncResult);

            base.ReleaseServiceProxy(glsAsyncResult.ServiceProxy);
            glsAsyncResult.Dispose();
            return(LocatorServiceClientReader.ConstructFindTenantResult(response));
        }
コード例 #4
0
        public bool EndTenantExists(IAsyncResult externalAR)
        {
            GlsAsyncResult     glsAsyncResult     = (GlsAsyncResult)externalAR;
            FindTenantResponse findTenantResponse = glsAsyncResult.ServiceProxy.EndFindTenant(glsAsyncResult.InternalAsyncResult);

            base.ReleaseServiceProxy(glsAsyncResult.ServiceProxy);
            glsAsyncResult.Dispose();
            return(findTenantResponse.TenantInfo != null);
        }
コード例 #5
0
        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));
        }