aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/csharp/Grpc.Examples/MathServiceImpl.cs
diff options
context:
space:
mode:
authorGravatar Tim Emiola <tbetbetbe@users.noreply.github.com>2015-05-07 14:23:03 -0700
committerGravatar Tim Emiola <tbetbetbe@users.noreply.github.com>2015-05-07 14:23:03 -0700
commit57e289c103ffd8ca64bb95ad621de0643246f4ed (patch)
tree7913d7fe963701e3c2ac8bc3f2fc5f5bdfc081fb /src/csharp/Grpc.Examples/MathServiceImpl.cs
parenteb697aa12a4fa153a84b58a7e82ea5684bad067b (diff)
parent03e82e2cdffbc0d4c19cea9d16e24d0dbf353376 (diff)
Merge pull request #1504 from jtattermusch/csharp_api_fixes
Polishing the new C# API
Diffstat (limited to 'src/csharp/Grpc.Examples/MathServiceImpl.cs')
-rw-r--r--src/csharp/Grpc.Examples/MathServiceImpl.cs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/csharp/Grpc.Examples/MathServiceImpl.cs b/src/csharp/Grpc.Examples/MathServiceImpl.cs
index 83ec2a8c3d..800dee8735 100644
--- a/src/csharp/Grpc.Examples/MathServiceImpl.cs
+++ b/src/csharp/Grpc.Examples/MathServiceImpl.cs
@@ -46,12 +46,12 @@ namespace math
/// </summary>
public class MathServiceImpl : MathGrpc.IMathService
{
- public Task<DivReply> Div(DivArgs request)
+ public Task<DivReply> Div(ServerCallContext context, DivArgs request)
{
return Task.FromResult(DivInternal(request));
}
- public async Task Fib(FibArgs request, IServerStreamWriter<Num> responseStream)
+ public async Task Fib(ServerCallContext context, FibArgs request, IServerStreamWriter<Num> responseStream)
{
if (request.Limit <= 0)
{
@@ -68,7 +68,7 @@ namespace math
}
}
- public async Task<Num> Sum(IAsyncStreamReader<Num> requestStream)
+ public async Task<Num> Sum(ServerCallContext context, IAsyncStreamReader<Num> requestStream)
{
long sum = 0;
await requestStream.ForEach(async num =>
@@ -78,7 +78,7 @@ namespace math
return Num.CreateBuilder().SetNum_(sum).Build();
}
- public async Task DivMany(IAsyncStreamReader<DivArgs> requestStream, IServerStreamWriter<DivReply> responseStream)
+ public async Task DivMany(ServerCallContext context, IAsyncStreamReader<DivArgs> requestStream, IServerStreamWriter<DivReply> responseStream)
{
await requestStream.ForEach(async divArgs =>
{