Ejemplo n.º 1
0
        public EngineBase(ILogger <EngineBase> logService,
                          Context context,
                          IMessageBusConsumer busClient,
                          IOptions <CrawlerOptions> opts,
                          IServiceProvider serviceProvider)
        {
            _taskFromSource = new List <ICrawlerTask>();
            _busClient      = busClient;
            _options        = opts.Value;
            LogService      = logService;

            BotName         = _options.BotName;
            ServiceProvider = serviceProvider;
            Context         = context;
            Context.BotName = BotName;

            _taskFromSource = serviceProvider.GetServices <ICrawlerTask>().ToList();
        }
 public MessageBusConsumerService(IMessageBusConsumer messageBusConsumer)
 {
     ServiceBusConsumer = messageBusConsumer;
 }