public void GetData(int temperature,float quality) { Console.WriteLine(); Console.WriteLine("---WaterData---"); var wateraData = new WaterData(); var desktopDataDipslay = new DesktopDataDipslay(wateraData); var webDataDisplay = new WebDataDisplay(wateraData); var mobileDataDisplay = new MobileDataDisplay(wateraData); var thirdPartyDisplay = new ThirdPartyDisplay(wateraData); wateraData.SetMeasurements(temperature, quality); }
public Facade() { _waterData = new WaterData(); _controller = new Controller(); }
public DesktopDataDipslay(WaterData waterData) { this._WaterData = waterData; waterData.RegisterObserver(this); }
public WebDataDisplay(WaterData weatherData) { this._waterData = weatherData; weatherData.RegisterObserver(this); }
public ThirdPartyDisplay(WaterData waterData) { this._waterData = waterData; waterData.RegisterObserver(this); }