aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/csharp/GrpcCore/Call.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/csharp/GrpcCore/Call.cs')
-rw-r--r--src/csharp/GrpcCore/Call.cs18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/csharp/GrpcCore/Call.cs b/src/csharp/GrpcCore/Call.cs
index bf257e5d59..735d1c544f 100644
--- a/src/csharp/GrpcCore/Call.cs
+++ b/src/csharp/GrpcCore/Call.cs
@@ -8,7 +8,6 @@ namespace Google.GRPC.Core
readonly string methodName;
readonly Func<TRequest, byte[]> requestSerializer;
readonly Func<byte[], TResponse> responseDeserializer;
- readonly TimeSpan timeout;
readonly Channel channel;
// TODO: channel param should be removed in the future.
@@ -20,24 +19,23 @@ namespace Google.GRPC.Core
this.methodName = methodName;
this.requestSerializer = requestSerializer;
this.responseDeserializer = responseDeserializer;
- this.timeout = timeout;
this.channel = channel;
}
-
- public Channel Channel
+ // TODO: channel param should be removed in the future.
+ public Call(Method<TRequest, TResponse> method, Channel channel)
{
- get
- {
- return this.channel;
- }
+ this.methodName = method.Name;
+ this.requestSerializer = method.RequestMarshaller.Serialize;
+ this.responseDeserializer = method.ResponseMarshaller.Deserialize;
+ this.channel = channel;
}
- public TimeSpan Timeout
+ public Channel Channel
{
get
{
- return this.timeout;
+ return this.channel;
}
}