public RelaySatellite(ISubject subject, double limit) { _subject = subject; _limit = limit; }
public StatisticsDisplay(ISubject weatherData) { this.weatherData = weatherData; weatherData.RegisterObserver(this); }
public HeatIndexDisplay(WeatherData weatherData) { this.weatherData = weatherData; weatherData.RegisterObserver(this); }
public Observer(string userName, ISubject subject) { UserName = userName; subject.RegisterObserver(this); }
//Al construcor se le pasa el objeto weatherData para registrar el display como observador. public CurrentConditionsDisplay(ISubject weatherData) { _weatherData = weatherData; weatherData.RegisterObserver(this); }
public void Update(ISubject subject) { Deliver(); }