static void Main(string[] args)
 {
     foreach (var i in ServiceBridge.helper.Com.Range(100))
     {
         using (var con = new ServiceSubscribe("es.qipeilong.net:2181"))
         {
             con.OnSubscribeFinishedAsync += async() =>
             {
                 Console.WriteLine("订阅完成");
                 await Task.FromResult(1);
             };
             con.ResolveSvc <Wcf.Contract.IUserService>();
             Console.WriteLine("订阅服务" + con.AllService().Count());
         }
     }
     //取消监听
     sub.Value.Dispose();
 }
示例#2
0
 public Caller(ServiceSubscribe client) : base(client.ResolveSvc <IService1>())
 {
 }