예제 #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);
 }