aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/csharp/Grpc.Core/Internal
diff options
context:
space:
mode:
authorGravatar Jan Tattermusch <jtattermusch@google.com>2015-05-18 15:27:19 -0700
committerGravatar Jan Tattermusch <jtattermusch@google.com>2015-05-20 18:35:52 -0700
commit43dc50beb2f2c30cfac500c00e9c81b40976a788 (patch)
treea24d50b89a2ebc887f0265f9b364fbde0d3c30e7 /src/csharp/Grpc.Core/Internal
parente1c24fcd0cb885360bf85cdb2dbee7e31c30fd16 (diff)
make naming of async write methods clearer (by adding Async suffix)
Diffstat (limited to 'src/csharp/Grpc.Core/Internal')
-rw-r--r--src/csharp/Grpc.Core/Internal/ClientRequestStream.cs4
-rw-r--r--src/csharp/Grpc.Core/Internal/ServerCallHandler.cs14
-rw-r--r--src/csharp/Grpc.Core/Internal/ServerResponseStream.cs4
3 files changed, 11 insertions, 11 deletions
diff --git a/src/csharp/Grpc.Core/Internal/ClientRequestStream.cs b/src/csharp/Grpc.Core/Internal/ClientRequestStream.cs
index b9fc10cd16..58f493463b 100644
--- a/src/csharp/Grpc.Core/Internal/ClientRequestStream.cs
+++ b/src/csharp/Grpc.Core/Internal/ClientRequestStream.cs
@@ -46,14 +46,14 @@ namespace Grpc.Core.Internal
this.call = call;
}
- public Task Write(TRequest message)
+ public Task WriteAsync(TRequest message)
{
var taskSource = new AsyncCompletionTaskSource<object>();
call.StartSendMessage(message, taskSource.CompletionDelegate);
return taskSource.Task;
}
- public Task Complete()
+ public Task CompleteAsync()
{
var taskSource = new AsyncCompletionTaskSource<object>();
call.StartSendCloseFromClient(taskSource.CompletionDelegate);
diff --git a/src/csharp/Grpc.Core/Internal/ServerCallHandler.cs b/src/csharp/Grpc.Core/Internal/ServerCallHandler.cs
index 20ac46c234..f494d9e0ff 100644
--- a/src/csharp/Grpc.Core/Internal/ServerCallHandler.cs
+++ b/src/csharp/Grpc.Core/Internal/ServerCallHandler.cs
@@ -78,7 +78,7 @@ namespace Grpc.Core.Internal
Preconditions.CheckArgument(!await requestStream.MoveNext());
var context = new ServerCallContext(); // TODO(jtattermusch): initialize the context
var result = await handler(context, request);
- await responseStream.Write(result);
+ await responseStream.WriteAsync(result);
}
catch (Exception e)
{
@@ -87,7 +87,7 @@ namespace Grpc.Core.Internal
}
try
{
- await responseStream.WriteStatus(status);
+ await responseStream.WriteStatusAsync(status);
}
catch (OperationCanceledException)
{
@@ -140,7 +140,7 @@ namespace Grpc.Core.Internal
try
{
- await responseStream.WriteStatus(status);
+ await responseStream.WriteStatusAsync(status);
}
catch (OperationCanceledException)
{
@@ -181,7 +181,7 @@ namespace Grpc.Core.Internal
var result = await handler(context, requestStream);
try
{
- await responseStream.Write(result);
+ await responseStream.WriteAsync(result);
}
catch (OperationCanceledException)
{
@@ -196,7 +196,7 @@ namespace Grpc.Core.Internal
try
{
- await responseStream.WriteStatus(status);
+ await responseStream.WriteStatusAsync(status);
}
catch (OperationCanceledException)
{
@@ -243,7 +243,7 @@ namespace Grpc.Core.Internal
}
try
{
- await responseStream.WriteStatus(status);
+ await responseStream.WriteStatusAsync(status);
}
catch (OperationCanceledException)
{
@@ -266,7 +266,7 @@ namespace Grpc.Core.Internal
var requestStream = new ServerRequestStream<byte[], byte[]>(asyncCall);
var responseStream = new ServerResponseStream<byte[], byte[]>(asyncCall);
- await responseStream.WriteStatus(new Status(StatusCode.Unimplemented, "No such method."));
+ await responseStream.WriteStatusAsync(new Status(StatusCode.Unimplemented, "No such method."));
// TODO(jtattermusch): if we don't read what client has sent, the server call never gets disposed.
await requestStream.ToList();
await finishedTask;
diff --git a/src/csharp/Grpc.Core/Internal/ServerResponseStream.cs b/src/csharp/Grpc.Core/Internal/ServerResponseStream.cs
index da688d504f..a2d77dd5b7 100644
--- a/src/csharp/Grpc.Core/Internal/ServerResponseStream.cs
+++ b/src/csharp/Grpc.Core/Internal/ServerResponseStream.cs
@@ -49,14 +49,14 @@ namespace Grpc.Core.Internal
this.call = call;
}
- public Task Write(TResponse message)
+ public Task WriteAsync(TResponse message)
{
var taskSource = new AsyncCompletionTaskSource<object>();
call.StartSendMessage(message, taskSource.CompletionDelegate);
return taskSource.Task;
}
- public Task WriteStatus(Status status)
+ public Task WriteStatusAsync(Status status)
{
var taskSource = new AsyncCompletionTaskSource<object>();
call.StartSendStatusFromServer(status, taskSource.CompletionDelegate);