public RollerShutterAutomation( AutomationId id, IHomeAutomationTimer timer, IDaylightService daylightService, IWeatherService weatherService, IComponentController componentController) : base(id) { if (timer == null) { throw new ArgumentNullException(nameof(timer)); } if (daylightService == null) { throw new ArgumentNullException(nameof(daylightService)); } if (weatherService == null) { throw new ArgumentNullException(nameof(weatherService)); } if (componentController == null) { throw new ArgumentNullException(nameof(componentController)); } _timer = timer; _daylightService = daylightService; _weatherService = weatherService; _componentController = componentController; SpecialSettingsWrapper = new RollerShutterAutomationSettingsWrapper(Settings); }
public RollerShutterAutomation( AutomationId id, ISchedulerService schedulerService, IDateTimeService dateTimeService, IDaylightService daylightService, IOutdoorTemperatureService outdoorTemperatureService, IComponentController componentController) : base(id) { if (schedulerService == null) { throw new ArgumentNullException(nameof(schedulerService)); } if (dateTimeService == null) { throw new ArgumentNullException(nameof(dateTimeService)); } if (daylightService == null) { throw new ArgumentNullException(nameof(daylightService)); } if (outdoorTemperatureService == null) { throw new ArgumentNullException(nameof(outdoorTemperatureService)); } if (componentController == null) { throw new ArgumentNullException(nameof(componentController)); } _schedulerService = schedulerService; _dateTimeService = dateTimeService; _daylightService = daylightService; _outdoorTemperatureService = outdoorTemperatureService; _componentController = componentController; SpecialSettingsWrapper = new RollerShutterAutomationSettingsWrapper(Settings); }