Esempio n. 1
0
 static void Main(string[] args)
 {
     using (ChannelFactory <IHello> channelFactoryHello = new ChannelFactory <IHello>("helloService"))
         using (ChannelFactory <IGoodbye> channelFactoryGoodbye = new ChannelFactory <IGoodbye>("goodbyeService"))
         {
             IHello   helloProxy   = channelFactoryHello.CreateChannel();
             IGoodbye goodbyeProxy = channelFactoryGoodbye.CreateChannel();
             Console.WriteLine(helloProxy.SayHello("Zhang San"));
             Console.WriteLine(goodbyeProxy.SayGoodbye("Li Si"));
         }
 }
Esempio n. 2
0
 public async Task <string> Goodbye()
 {
     return(await goodbyeGrain.SayGoodbye());
 }