diff options
author | Craig Tiller <craig.tiller@gmail.com> | 2015-05-08 16:38:32 -0700 |
---|---|---|
committer | Craig Tiller <craig.tiller@gmail.com> | 2015-05-08 16:38:32 -0700 |
commit | 0b488f7649065ad6f00cabbbb617a05dfc7a92e3 (patch) | |
tree | 7a9381245a9913b6123910a531a0d1a20a463a14 /src/csharp/Grpc.Examples/MathExamples.cs | |
parent | 2be6095c10353fbcdfbdec50e269775c1a42641d (diff) | |
parent | b8b59b18f2585b602a8c4282ebaf4d5c8bef473a (diff) |
Merge github.com:grpc/grpc into churn-churn-churn-the-api-gently-down-the-stream
Conflicts:
test/cpp/end2end/async_end2end_test.cc
Diffstat (limited to 'src/csharp/Grpc.Examples/MathExamples.cs')
-rw-r--r-- | src/csharp/Grpc.Examples/MathExamples.cs | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/csharp/Grpc.Examples/MathExamples.cs b/src/csharp/Grpc.Examples/MathExamples.cs index dba5a7736c..ab06a44c0d 100644 --- a/src/csharp/Grpc.Examples/MathExamples.cs +++ b/src/csharp/Grpc.Examples/MathExamples.cs @@ -31,7 +31,6 @@ using System; using System.Collections.Generic; -using System.Reactive.Linq; using System.Threading.Tasks; using Grpc.Core.Utils; @@ -39,34 +38,34 @@ namespace math { public static class MathExamples { - public static void DivExample(MathGrpc.IMathServiceClient stub) + public static void DivExample(Math.IMathClient stub) { DivReply result = stub.Div(new DivArgs.Builder { Dividend = 10, Divisor = 3 }.Build()); Console.WriteLine("Div Result: " + result); } - public static async Task DivAsyncExample(MathGrpc.IMathServiceClient stub) + public static async Task DivAsyncExample(Math.IMathClient stub) { Task<DivReply> resultTask = stub.DivAsync(new DivArgs.Builder { Dividend = 4, Divisor = 5 }.Build()); DivReply result = await resultTask; Console.WriteLine("DivAsync Result: " + result); } - public static async Task DivAsyncWithCancellationExample(MathGrpc.IMathServiceClient stub) + public static async Task DivAsyncWithCancellationExample(Math.IMathClient stub) { Task<DivReply> resultTask = stub.DivAsync(new DivArgs.Builder { Dividend = 4, Divisor = 5 }.Build()); DivReply result = await resultTask; Console.WriteLine(result); } - public static async Task FibExample(MathGrpc.IMathServiceClient stub) + public static async Task FibExample(Math.IMathClient stub) { var call = stub.Fib(new FibArgs.Builder { Limit = 5 }.Build()); List<Num> result = await call.ResponseStream.ToList(); Console.WriteLine("Fib Result: " + string.Join("|", result)); } - public static async Task SumExample(MathGrpc.IMathServiceClient stub) + public static async Task SumExample(Math.IMathClient stub) { var numbers = new List<Num> { @@ -80,7 +79,7 @@ namespace math Console.WriteLine("Sum Result: " + await call.Result); } - public static async Task DivManyExample(MathGrpc.IMathServiceClient stub) + public static async Task DivManyExample(Math.IMathClient stub) { var divArgsList = new List<DivArgs> { @@ -93,7 +92,7 @@ namespace math Console.WriteLine("DivMany Result: " + string.Join("|", await call.ResponseStream.ToList())); } - public static async Task DependendRequestsExample(MathGrpc.IMathServiceClient stub) + public static async Task DependendRequestsExample(Math.IMathClient stub) { var numbers = new List<Num> { |