Пример #1
0
 public HelloWorldController(IClusterClient clusterClient)
 {
     this.clusterClient = clusterClient;
     //Initialize the grains that the controller instance will use
     helloGrain   = this.clusterClient.GetGrain <IHello>(new Guid());
     goodbyeGrain = this.clusterClient.GetGrain <IGoodbye>(new Guid());
 }
Пример #2
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"));
         }
 }