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); }
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); }