public ThemostatController(IThermostatService thermostatService) { _thermostatService = thermostatService; _thermostatService.Hot += OnSwitchOff; _thermostatService.Cold -= OnSwitchOn; _thermostatService.TempChanged += OnTempChanged; }
public ThermostatController(IThermostatService thermostatService, IMailService mailService) { _thermostatService = thermostatService; _mailService = mailService; }