public Task Send <T>(T message, CancellationToken cancellationToken) where T : class { if (message == null) { throw new ArgumentNullException(nameof(message)); } var sendContextPipe = new ConsumeSendContextPipe <T>(_context); return(_tracker(_endpoint.Send(message, sendContextPipe, cancellationToken))); }
public Task Send <T>(T message, CancellationToken cancellationToken) where T : class { if (message == null) { throw new ArgumentNullException(nameof(message)); } var sendContextPipe = new ConsumeSendContextPipe <T>(_context); var task = _endpoint.Send(message, sendContextPipe, cancellationToken); _context.ReceiveContext.AddPendingTask(task); return(task); }