Exemplo n.º 1
0
 public StatisticsService(ILogger <StatisticsService> logger,
                          IMessageQueue messageQueue,
                          IStatisticsStore statisticsStore)
 {
     _logger          = logger;
     _messageQueue    = messageQueue;
     _statisticsStore = statisticsStore;
 }
Exemplo n.º 2
0
 public DependenceServices(IServiceProvider serviceProvider,
                           IScheduler scheduler,
                           IMessageQueue messageQueue,
                           IStatisticsClient statisticsClient,
                           IHostApplicationLifetime applicationLifetime)
 {
     ServiceProvider     = serviceProvider;
     Scheduler           = scheduler;
     MessageQueue        = messageQueue;
     StatisticsClient    = statisticsClient;
     ApplicationLifetime = applicationLifetime;
 }
Exemplo n.º 3
0
 public AgentService(ILogger <AgentService> logger,
                     IMessageQueue messageQueue,
                     IOptions <AgentOptions> options,
                     IHostApplicationLifetime applicationLifetime,
                     IDownloader downloader)
 {
     _options             = options.Value;
     _logger              = logger;
     _messageQueue        = messageQueue;
     _applicationLifetime = applicationLifetime;
     _downloader          = downloader;
     _consumers           = new List <MessageQueue.AsyncMessageConsumer <byte[]> >();
 }
Exemplo n.º 4
0
        public AgentService(ILogger <AgentService> logger,
                            IMessageQueue messageQueue,
                            IOptions <AgentOptions> options,
                            IHostApplicationLifetime applicationLifetime,
                            IDownloader downloader, HostBuilderContext hostBuilderContext)
        {
            _options             = options.Value;
            _logger              = logger;
            _messageQueue        = messageQueue;
            _applicationLifetime = applicationLifetime;
            _downloader          = downloader;
            _consumers           = new List <MessageQueue.AsyncMessageConsumer <byte[]> >();

            hostBuilderContext.Properties[Const.DefaultDownloader] = downloader.Name;
        }
Exemplo n.º 5
0
 public DependenceServices(IServiceProvider serviceProvider,
                           IScheduler scheduler,
                           IMessageQueue messageQueue,
                           IStatisticsClient statisticsClient,
                           IHostApplicationLifetime applicationLifetime,
                           IProxyPool proxyPool)
 {
     ServiceProvider     = serviceProvider;
     Scheduler           = scheduler;
     MessageQueue        = messageQueue;
     StatisticsClient    = statisticsClient;
     ProxyPool           = proxyPool;
     ApplicationLifetime = applicationLifetime;
     IsDistributed       = !(messageQueue is MessageQueue.MessageQueue);
 }
Exemplo n.º 6
0
 public DependenceServices(IServiceProvider serviceProvider,
                           IScheduler scheduler,
                           IMessageQueue messageQueue,
                           IStatisticsClient statisticsClient,
                           IHostApplicationLifetime applicationLifetime,
                           IConfiguration configuration,
                           HostBuilderContext builderContext)
 {
     ServiceProvider     = serviceProvider;
     Scheduler           = scheduler;
     MessageQueue        = messageQueue;
     StatisticsClient    = statisticsClient;
     ApplicationLifetime = applicationLifetime;
     HostBuilderContext  = builderContext;
     Configuration       = configuration;
 }
Exemplo n.º 7
0
 public AgentService(ILogger <AgentService> logger,
                     IMessageQueue messageQueue,
                     IOptions <AgentOptions> options,
                     IHostApplicationLifetime applicationLifetime,
                     DownloaderFactory downloaderFactory)
 {
     _options             = options.Value;
     _logger              = logger;
     _messageQueue        = messageQueue;
     _applicationLifetime = applicationLifetime;
     _downloaderFactory   = downloaderFactory;
     _consumers           = new List <MessageQueue.AsyncMessageConsumer <byte[]> >();
     _distributed         = !(messageQueue is MessageQueue.MessageQueue);
     if (!_distributed)
     {
         _options.AgentId   = Guid.NewGuid().ToString();
         _options.AgentName = _options.AgentId;
     }
 }
Exemplo n.º 8
0
 public StatisticsClient(IMessageQueue messageQueue)
 {
     _messageQueue = messageQueue;
 }