コード例 #1
0
        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)));
        }
コード例 #2
0
 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));
 }