Пример #1
0
        public AsyncConsumerOptionsBuilder(IServiceProvider serviceProvider)
        {
            Options          = new AsyncConsumerOptions <TObj>();
            _serviceProvider = serviceProvider;

            var globalPipelines = serviceProvider.GetServices <IConsumerPipeline <TObj> >();

            Options.Pipelines.AddRange(globalPipelines);
        }
 public AsyncConsumerService(IMessageConsumer consumer, TService service, AsyncConsumerOptions <TObj> options)
 {
     _consumer = consumer;
     _service  = service;
     _options  = options;
 }