public RequestHandle <TRequest> Create(TRequest message, CancellationToken cancellationToken, RequestTimeout timeout) { async Task <TRequest> Request(Guid requestId, IPipe <SendContext <TRequest> > pipe, CancellationToken token) { await _requestSendEndpoint.Send(requestId, message, pipe, token).ConfigureAwait(false); return(message); } return(new ClientRequestHandle <TRequest>(_context, Request, cancellationToken, timeout.Or(_timeout))); }
public Task <TRequest> Send(Guid requestId, object values, IPipe <SendContext <TRequest> > pipe, CancellationToken cancellationToken) { return(_endpoint.Send(requestId, values, new ScopedSendPipeAdapter <TScope, TRequest>(_scope, pipe), cancellationToken)); }