public Program(TextWriter output, IWeatherService weatherService) { this.output = output ?? throw new ArgumentNullException(nameof(output)); this.weatherService = weatherService ?? throw new ArgumentNullException(nameof(weatherService)); this.formatter = new DefaultWeatherFormatter(); }
public WeatherService(IRepository <CityWeather> repository, IWeatherHttpClient weatherHttpClient, IWeatherFormatter formatter) { _repository = repository; _weatherHttpClient = weatherHttpClient; _formatter = formatter; }