public HomeController(string homeName, TemperatureSensor tempSensor, AirConditioner airConditioner) { this.tempSensor = tempSensor; this.airConditioner = airConditioner; Name = homeName; tempSensor.AddHandler(TemperatureChanged); CoolHome(); new Thread(StartTempSensor).Start(); }
public HomeController(string homeName, TemperatureSensor tempSensor) : this(homeName, tempSensor, new AirConditioner()) { }