Esempio n. 1
0
        public InputDataController(IConfiguration config,
                                   IIndex <string, ISimpleBackground> background,
                                   InputDataApplyService <AdInputType> inputDataApplyService,
                                   ILogger logger)

        {
            _inputDataApplyService = inputDataApplyService;
            _logger = logger;
            var backgroundName = config["MessageBrokerConsumer4InData:Name"];

            _background = background[backgroundName];
        }
Esempio n. 2
0
        public ConsumerMessageBroker4InputData(
            ISimpleBackground background,
            IConsumer consumer,
            ILogger logger,
            InputDataApplyService <TIn> inputDataApplyService,
            int batchSize)
        {
            _batchSize             = batchSize;
            _consumer              = consumer;
            _logger                = logger;
            _inputDataApplyService = inputDataApplyService;

            background.AddOneTimeAction(RunAsync);
        }