public async Task Send <TMessage>(ConsumeContext <TMessage> context, IPipe <ConsumerConsumeContext <TConsumer, TMessage> > next) where TMessage : class { await using IConsumerScopeContext <TConsumer, TMessage> scope = await _scopeProvider.GetScope <TConsumer, TMessage>(context); await next.Send(scope.Context).ConfigureAwait(false); }
public async Task Send(ConsumeContext context, IPipe <ConsumeContext> next) { using (var scope = _scopeProvider.GetScope(context)) { await next.Send(scope.Context).ConfigureAwait(false); } }