public void Notify(IObservable sender, WeatherInfo info) { foreach (var item in observers) { item.Update(this, info); } }
public void Update(IObservable sender, WeatherInfo info) => Console.WriteLine("Statistic");
public void Update(IObservable sender, WeatherInfo info) => Console.WriteLine("ForeCast");
public void Update(IObservable sender, WeatherInfo info) => Console.WriteLine("CurrentConditions");
public WeatherData() { observers = new List <IObserver>(); WeatherInfo = new WeatherInfo(); }