diff options
author | Jan Tattermusch <jtattermusch@google.com> | 2015-08-20 14:54:33 -0700 |
---|---|---|
committer | Jan Tattermusch <jtattermusch@google.com> | 2015-08-20 18:36:28 -0700 |
commit | 2b3579541b2500ac5b09766920c8cba3a996a73a (patch) | |
tree | d2a21ef29a23dd4e412fa00ff76d52153c3ada99 /src/csharp/Grpc.Examples.MathClient | |
parent | 10cab1396fd6fce4539f6368bda6ea908e1ce27b (diff) |
get rid of explicit GrpcEnvironment.Shutdown()
Diffstat (limited to 'src/csharp/Grpc.Examples.MathClient')
-rw-r--r-- | src/csharp/Grpc.Examples.MathClient/MathClient.cs | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/src/csharp/Grpc.Examples.MathClient/MathClient.cs b/src/csharp/Grpc.Examples.MathClient/MathClient.cs index f9839d99f1..abd95cb905 100644 --- a/src/csharp/Grpc.Examples.MathClient/MathClient.cs +++ b/src/csharp/Grpc.Examples.MathClient/MathClient.cs @@ -39,23 +39,21 @@ namespace math { public static void Main(string[] args) { - using (Channel channel = new Channel("127.0.0.1", 23456, Credentials.Insecure)) - { - Math.IMathClient client = new Math.MathClient(channel); - MathExamples.DivExample(client); + var channel = new Channel("127.0.0.1", 23456, Credentials.Insecure); + Math.IMathClient client = new Math.MathClient(channel); + MathExamples.DivExample(client); - MathExamples.DivAsyncExample(client).Wait(); + MathExamples.DivAsyncExample(client).Wait(); - MathExamples.FibExample(client).Wait(); + MathExamples.FibExample(client).Wait(); - MathExamples.SumExample(client).Wait(); + MathExamples.SumExample(client).Wait(); - MathExamples.DivManyExample(client).Wait(); + MathExamples.DivManyExample(client).Wait(); - MathExamples.DependendRequestsExample(client).Wait(); - } + MathExamples.DependendRequestsExample(client).Wait(); - GrpcEnvironment.Shutdown(); + channel.ShutdownAsync().Wait(); } } } |