public void Notify(WeatherInCity weather) { foreach (Subscriber subscriber in subscriptions) { subscriber.Observe(weather); } }
public void Observe(WeatherInCity weather) { if (this.strategy != null && this.strategy.IsOk(weather.WeatherForecast)) { Console.WriteLine($"{DateTime.Now}: Hey {Login}, the weather in {weather.City} will be good, have fun!"); } }