示例#1
0
 public DiggerWorker(
     ClientFactory clientFactory,
     ILogger <DiggerWorker> logger,
     ExplorerWorker explorerWorker)
 {
     _client         = clientFactory.Create();
     _logger         = logger;
     _explorerWorker = explorerWorker;
 }
示例#2
0
        public MainWorker(
            ILoggerFactory loggerFactory,
            ClientFactory clientFactory)
        {
            _client = clientFactory.Create();
            var logger = loggerFactory.CreateLogger <MainWorker>();

            _explorerWorker = new ExplorerWorker(
                clientFactory,
                loggerFactory.CreateLogger <ExplorerWorker>()
                );
            _diggerWorker = new DiggerWorker(
                clientFactory,
                loggerFactory.CreateLogger <DiggerWorker>(),
                _explorerWorker
                );
        }