public IConsumerInvoker CreateInvoker(ConsumerContext consumerContext) { var context = new ConsumerInvokerContext(consumerContext) { Result = new DefaultConsumerInvoker(_logger, _serviceProvider, _modelBinderFactory, consumerContext) }; return(context.Result); }
public IConsumerInvoker CreateInvoker(ConsumerContext consumerContext) { using (var scope = _serviceProvider.CreateScope()) { var context = new ConsumerInvokerContext(consumerContext) { Result = new DefaultConsumerInvoker(_logger, scope.ServiceProvider, _modelBinderFactory, consumerContext) }; return(context.Result); } }