Exemple #1
0
 /// <summary>
 /// 服务主动发现器
 /// </summary>
 /// <param name="cache">服务缓存</param>
 public AdHocDiscoveryClient(EndpointDiscoveryMetadataCollection cache)
 {
     if (cache == null)
     {
         throw new ArgumentNullException("cache");
     }
     this.cache = cache;
 }
 /// <summary>
 /// 监听指定类型服务的上下线通知的服务
 /// </summary>
 /// <param name="cache">服务缓存</param>
 public AnnouncementMonitor(EndpointDiscoveryMetadataCollection cache)
 {
     if (cache == null)
     {
         throw new ArgumentNullException("cache");
     }
     this.cache = cache;
 }
 /// <summary>
 /// 服务发现代理
 /// </summary>
 /// <param name="cache">服务缓存</param>
 public ServiceDiscoveryProxy(EndpointDiscoveryMetadataCollection cache)
     : base()
 {
     if (cache == null)
     {
         throw new ArgumentNullException("cache");
     }
     this.cache = cache;
 }
Exemple #4
0
        /// <summary>
        /// 在指定的服务发现代理服务器中查找指定的服务
        /// </summary>
        /// <param name="proxyAddress">发现代理服务器地址</param>
        /// <param name="cache">缓存</param>
        public ServiceDiscoveryProxyClient(string proxyAddress, EndpointDiscoveryMetadataCollection cache)
        {
            if (string.IsNullOrEmpty(proxyAddress))
            {
                throw new ArgumentNullException("proxyAddress");
            }

            // 指定的代理服务器
            this.proxyAddress = proxyAddress;

            if (cache == null)
            {
                throw new ArgumentNullException("cache");
            }
            this.cache = cache;
        }