예제 #1
0
 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();
 }
예제 #2
0
 public WeatherService(IRepository <CityWeather> repository, IWeatherHttpClient weatherHttpClient, IWeatherFormatter formatter)
 {
     _repository        = repository;
     _weatherHttpClient = weatherHttpClient;
     _formatter         = formatter;
 }