using System; using Google.GRPC.Core.Internal; namespace Google.GRPC.Core { public class Call { readonly string methodName; readonly Func requestSerializer; readonly Func responseDeserializer; readonly Channel channel; public Call(string methodName, Func requestSerializer, Func responseDeserializer, TimeSpan timeout, Channel channel) { this.methodName = methodName; this.requestSerializer = requestSerializer; this.responseDeserializer = responseDeserializer; this.channel = channel; } public Call(Method method, Channel channel) { this.methodName = method.Name; this.requestSerializer = method.RequestMarshaller.Serializer; this.responseDeserializer = method.ResponseMarshaller.Deserializer; this.channel = channel; } public Channel Channel { get { return this.channel; } } public string MethodName { get { return this.methodName; } } public Func RequestSerializer { get { return this.requestSerializer; } } public Func ResponseDeserializer { get { return this.responseDeserializer; } } } }