public ControllerSlaveService( ISettingsService settingsService, ISchedulerService scheduler, IDateTimeService dateTimeService, IOutdoorTemperatureService outdoorTemperatureService, IOutdoorHumidityService outdoorHumidityService, IDaylightService daylightService, IWeatherService weatherService) { if (settingsService == null) throw new ArgumentNullException(nameof(settingsService)); if (scheduler == null) throw new ArgumentNullException(nameof(scheduler)); if (dateTimeService == null) throw new ArgumentNullException(nameof(dateTimeService)); if (outdoorTemperatureService == null) throw new ArgumentNullException(nameof(outdoorTemperatureService)); if (outdoorHumidityService == null) throw new ArgumentNullException(nameof(outdoorHumidityService)); if (daylightService == null) throw new ArgumentNullException(nameof(daylightService)); if (weatherService == null) throw new ArgumentNullException(nameof(weatherService)); _dateTimeService = dateTimeService; _outdoorTemperatureService = outdoorTemperatureService; _outdoorHumidityService = outdoorHumidityService; _daylightService = daylightService; _weatherService = weatherService; settingsService.CreateSettingsMonitor<ControllerSlaveServiceSettings>(s => Settings = s); scheduler.RegisterSchedule("ControllerSlavePolling", TimeSpan.FromMinutes(5), PullValues); }
public OpenWeatherMapService( IOutdoorTemperatureService outdoorTemperatureService, IOutdoorHumidityService outdoorHumidityService, IDaylightService daylightService, IWeatherService weatherService, IDateTimeService dateTimeService, ISchedulerService schedulerService, ISystemInformationService systemInformationService, ISettingsService settingsService, IStorageService storageService) { if (outdoorTemperatureService == null) throw new ArgumentNullException(nameof(outdoorTemperatureService)); if (outdoorHumidityService == null) throw new ArgumentNullException(nameof(outdoorHumidityService)); if (daylightService == null) throw new ArgumentNullException(nameof(daylightService)); if (weatherService == null) throw new ArgumentNullException(nameof(weatherService)); if (dateTimeService == null) throw new ArgumentNullException(nameof(dateTimeService)); if (systemInformationService == null) throw new ArgumentNullException(nameof(systemInformationService)); if (settingsService == null) throw new ArgumentNullException(nameof(settingsService)); if (storageService == null) throw new ArgumentNullException(nameof(storageService)); _outdoorTemperatureService = outdoorTemperatureService; _outdoorHumidityService = outdoorHumidityService; _daylightService = daylightService; _weatherService = weatherService; _dateTimeService = dateTimeService; _systemInformationService = systemInformationService; _storageService = storageService; settingsService.CreateSettingsMonitor<OpenWeatherMapServiceSettings>(s => Settings = s); LoadPersistedData(); schedulerService.RegisterSchedule("OpenWeatherMapServiceUpdater", TimeSpan.FromMinutes(5), Refresh); }
public ControllerSlaveService( ISettingsService settingsService, ISchedulerService scheduler, IDateTimeService dateTimeService, IOutdoorTemperatureService outdoorTemperatureService, IOutdoorHumidityService outdoorHumidityService, IDaylightService daylightService, IWeatherService weatherService, ILogService logService) { if (settingsService == null) { throw new ArgumentNullException(nameof(settingsService)); } if (scheduler == null) { throw new ArgumentNullException(nameof(scheduler)); } _dateTimeService = dateTimeService ?? throw new ArgumentNullException(nameof(dateTimeService)); _outdoorTemperatureService = outdoorTemperatureService ?? throw new ArgumentNullException(nameof(outdoorTemperatureService)); _outdoorHumidityService = outdoorHumidityService ?? throw new ArgumentNullException(nameof(outdoorHumidityService)); _daylightService = daylightService ?? throw new ArgumentNullException(nameof(daylightService)); _weatherService = weatherService ?? throw new ArgumentNullException(nameof(weatherService)); _log = logService?.CreatePublisher(nameof(ControllerSlaveService)) ?? throw new ArgumentNullException(nameof(logService)); settingsService.CreateSettingsMonitor <ControllerSlaveServiceSettings>(s => Settings = s.NewSettings); scheduler.RegisterSchedule("ControllerSlavePolling", TimeSpan.FromMinutes(5), () => PullValues()); }
public OpenWeatherMapService( IOutdoorTemperatureService outdoorTemperatureService, IOutdoorHumidityService outdoorHumidityService, IDaylightService daylightService, IWeatherService weatherService, IDateTimeService dateTimeService, ISchedulerService schedulerService, ISystemInformationService systemInformationService, ISettingsService settingsService, IStorageService storageService, ILogService logService) { if (settingsService == null) { throw new ArgumentNullException(nameof(settingsService)); } _schedulerService = schedulerService ?? throw new ArgumentNullException(nameof(schedulerService)); _outdoorTemperatureService = outdoorTemperatureService ?? throw new ArgumentNullException(nameof(outdoorTemperatureService)); _outdoorHumidityService = outdoorHumidityService ?? throw new ArgumentNullException(nameof(outdoorHumidityService)); _daylightService = daylightService ?? throw new ArgumentNullException(nameof(daylightService)); _weatherService = weatherService ?? throw new ArgumentNullException(nameof(weatherService)); _dateTimeService = dateTimeService ?? throw new ArgumentNullException(nameof(dateTimeService)); _systemInformationService = systemInformationService ?? throw new ArgumentNullException(nameof(systemInformationService)); _storageService = storageService ?? throw new ArgumentNullException(nameof(storageService)); _log = logService?.CreatePublisher(nameof(OpenWeatherMapService)) ?? throw new ArgumentNullException(nameof(logService)); settingsService.CreateSettingsMonitor <OpenWeatherMapServiceSettings>(s => Settings = s.NewSettings); }
public OpenWeatherMapService( IOutdoorTemperatureService outdoorTemperatureService, IOutdoorHumidityService outdoorHumidityService, IDaylightService daylightService, IWeatherService weatherService, IDateTimeService dateTimeService, ISchedulerService schedulerService, ISystemInformationService systemInformationService, ISettingsService settingsService, IStorageService storageService) { if (outdoorTemperatureService == null) { throw new ArgumentNullException(nameof(outdoorTemperatureService)); } if (outdoorHumidityService == null) { throw new ArgumentNullException(nameof(outdoorHumidityService)); } if (daylightService == null) { throw new ArgumentNullException(nameof(daylightService)); } if (weatherService == null) { throw new ArgumentNullException(nameof(weatherService)); } if (dateTimeService == null) { throw new ArgumentNullException(nameof(dateTimeService)); } if (systemInformationService == null) { throw new ArgumentNullException(nameof(systemInformationService)); } if (settingsService == null) { throw new ArgumentNullException(nameof(settingsService)); } if (storageService == null) { throw new ArgumentNullException(nameof(storageService)); } _outdoorTemperatureService = outdoorTemperatureService; _outdoorHumidityService = outdoorHumidityService; _daylightService = daylightService; _weatherService = weatherService; _dateTimeService = dateTimeService; _systemInformationService = systemInformationService; _storageService = storageService; settingsService.CreateSettingsMonitor <OpenWeatherMapServiceSettings>(s => Settings = s); LoadPersistedData(); schedulerService.RegisterSchedule("OpenWeatherMapServiceUpdater", TimeSpan.FromMinutes(5), Refresh); }
public PersonalAgentService( ISettingsService settingsService, IComponentRegistryService componentRegistry, IAreaRegistryService areaService, IWeatherService weatherService, IOutdoorTemperatureService outdoorTemperatureService, IOutdoorHumidityService outdoorHumidityService, ILogService logService) { _settingsService = settingsService ?? throw new ArgumentNullException(nameof(settingsService)); _componentsRegistry = componentRegistry ?? throw new ArgumentNullException(nameof(componentRegistry)); _areaService = areaService ?? throw new ArgumentNullException(nameof(areaService)); _weatherService = weatherService ?? throw new ArgumentNullException(nameof(weatherService)); _outdoorTemperatureService = outdoorTemperatureService ?? throw new ArgumentNullException(nameof(outdoorTemperatureService)); _outdoorHumidityService = outdoorHumidityService ?? throw new ArgumentNullException(nameof(outdoorHumidityService)); _log = logService?.CreatePublisher(nameof(PersonalAgentService)) ?? throw new ArgumentNullException(nameof(logService)); }
public PersonalAgentService( SynonymService synonymService, IComponentService componentService, IAreaService areaService, IWeatherService weatherService, IOutdoorTemperatureService outdoorTemperatureService, IOutdoorHumidityService outdoorHumidityService) { if (synonymService == null) { throw new ArgumentNullException(nameof(synonymService)); } if (componentService == null) { throw new ArgumentNullException(nameof(componentService)); } if (areaService == null) { throw new ArgumentNullException(nameof(areaService)); } if (weatherService == null) { throw new ArgumentNullException(nameof(weatherService)); } if (outdoorTemperatureService == null) { throw new ArgumentNullException(nameof(outdoorTemperatureService)); } if (outdoorHumidityService == null) { throw new ArgumentNullException(nameof(outdoorHumidityService)); } _synonymService = synonymService; _componentService = componentService; _areaService = areaService; _weatherService = weatherService; _outdoorTemperatureService = outdoorTemperatureService; _outdoorHumidityService = outdoorHumidityService; }
public PersonalAgentService( SynonymService synonymService, IComponentService componentService, IAreaService areaService, IWeatherService weatherService, IOutdoorTemperatureService outdoorTemperatureService, IOutdoorHumidityService outdoorHumidityService) { if (synonymService == null) throw new ArgumentNullException(nameof(synonymService)); if (componentService == null) throw new ArgumentNullException(nameof(componentService)); if (areaService == null) throw new ArgumentNullException(nameof(areaService)); if (weatherService == null) throw new ArgumentNullException(nameof(weatherService)); if (outdoorTemperatureService == null) throw new ArgumentNullException(nameof(outdoorTemperatureService)); if (outdoorHumidityService == null) throw new ArgumentNullException(nameof(outdoorHumidityService)); _synonymService = synonymService; _componentService = componentService; _areaService = areaService; _weatherService = weatherService; _outdoorTemperatureService = outdoorTemperatureService; _outdoorHumidityService = outdoorHumidityService; }