Exemplo n.º 1
0
 public AirConditioner(TemperatureSensor temperatureSensor, decimal minCoolingTemperature)
 {
     MinCoolingTemperature = minCoolingTemperature;
     _temperatureSensor    = temperatureSensor;
     _temperatureSensor.AddListener(this);
 }
Exemplo n.º 2
0
 public Heater(TemperatureSensor temperatureSensor, decimal maxHeatingTemperature)
 {
     MaxHeatingTemperature = maxHeatingTemperature;
     _temperatureSensor    = temperatureSensor;
     _temperatureSensor.AddListener(this);
 }