Ejemplo n.º 1
0
        Task IPipe <SendContext <TRequest> > .Send(SendContext <TRequest> context)
        {
            context.RequestId       = NewId.NextGuid();
            context.ResponseAddress = _bus.Address;

            _requestContext = new SendRequestContext <TRequest>(_bus, context, _taskScheduler, _callback);

            return(TaskUtil.Completed);
        }
Ejemplo n.º 2
0
        Task IPipe <SendContext <TRequest> > .Send(SendContext <TRequest> context)
        {
            context.RequestId       = _requestId;
            context.ResponseAddress = _bus.Address;

            if (_requestContext == null)
            {
                _requestContext = new SendRequestContext <TRequest>(_bus, context, _taskScheduler, _callback);
            }
            else
            {
                var publishContext = new PublishRequestContext <TRequest>(_bus, context, _callback, _requestContext.Connections, ((RequestContext <TRequest>)_requestContext).Task);
            }

            return(TaskUtil.Completed);
        }