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")); } }
public async Task <string> Goodbye() { return(await goodbyeGrain.SayGoodbye()); }