示例#1
0
文件: Call.cs 项目: sidrakesh93/grpc
 public Call(string serviceName, Method <TRequest, TResponse> method, Channel channel, Metadata headers)
 {
     this.name = method.GetFullName(serviceName);
     this.requestMarshaller  = method.RequestMarshaller;
     this.responseMarshaller = method.ResponseMarshaller;
     this.channel            = Preconditions.CheckNotNull(channel);
     this.headers            = Preconditions.CheckNotNull(headers);
 }
示例#2
0
 public Builder AddMethod <TRequest, TResponse>(
     Method <TRequest, TResponse> method,
     ServerStreamingServerMethod <TRequest, TResponse> handler)
     where TRequest : class
     where TResponse : class
 {
     callHandlers.Add(method.GetFullName(serviceName), ServerCalls.ServerStreamingCall(method, handler));
     return(this);
 }