Beispiel #1
0
        public TestModel(IWorkersFabric workersFabric,
                         IBrockersFabric brockersFabric,
                         IStatisticsCollector statisticsCollector)
        {
            StatisticsCollector = statisticsCollector;

            _brockersFabric = brockersFabric;
            _workersRepository = new WorkersRepository(statisticsCollector);
            _workersFabric = workersFabric;
        }
Beispiel #2
0
 public DataProcessor(List<FrameQueue> queues, IBrocker brocker, WorkersRepository workersRepository)
 {
     _brocker = brocker;
     _unlockedQueues = queues.ToDictionary(queue => queue.Id, queue => true);
     _queues = queues;
     foreach (var worker in workersRepository.GetAll())
     {
         worker.Ready += WorkerOnReady;
     }
 }