Esempio n. 1
0
 public StatusUpdater(
     ICursor cursor,
     IEnumerable <IEntityCollector> collectors,
     IActiveEventEntityUpdater activeEventUpdater,
     ILogger <StatusUpdater> logger)
 {
     _cursor    = cursor ?? throw new ArgumentNullException(nameof(cursor));
     collectors = collectors?.Where(c => c != null)
                  ?? throw new ArgumentNullException(nameof(collectors));
     _incidentCollector = collectors.SingleOrDefault(IsIncidentCollector)
                          ?? throw new ArgumentException(nameof(collectors), $"Must provide a collector with name {IncidentEntityCollectorProcessor.IncidentsCollectorName}!");
     _manualStatusChangeCollectors = collectors
                                     .Where(c => !IsIncidentCollector(c))
                                     .ToList();
     _activeEventUpdater = activeEventUpdater ?? throw new ArgumentNullException(nameof(activeEventUpdater));
     _logger             = logger ?? throw new ArgumentNullException(nameof(logger));
 }
        public TankSpawner(
            IEntityCollector<IModel> modelsCollector,
            IEntityCollector<IController> controllersCollector,
            IEntityCollector<IView> viewsCollector,

            IEntityCollector<IView> worldViewCollector,
            
            ITankModelFactory modelFactory,
            ITankViewFactory worldViewFactory,
            ITankControllerFactory controllerFactory)
        {
            _modelsCollector = modelsCollector;
            _controllersCollector = controllersCollector;
            _viewsCollector = viewsCollector;
            _worldViewCollector = worldViewCollector;
            _modelFactory = modelFactory;
            _worldViewFactory = worldViewFactory;
            _controllerFactory = controllerFactory;
        }
        public BookController(IRepository <Book> bookRepo, IEntityCollector entityCollector)
        {
            this.mainBookRepo = bookRepo;

            this.entityCollector = entityCollector;
        }
 public CommonBookController(IRepository <CommonBook> comBookRepo, IEntityCollector entityCollector)
 {
     this.comBookRepo     = comBookRepo;
     this.entityCollector = entityCollector;
 }
Esempio n. 5
0
 private static bool IsIncidentCollector(IEntityCollector collector)
 {
     return(collector.Name == IncidentEntityCollectorProcessor.IncidentsCollectorName);
 }