Example #1
0
 public WeatherClient(WeatherClientSettings settings, HttpClient client)
 {
     Settings             = settings;
     httpClient           = client;
     currentWeatherClient = new CurrentWeatherClient(httpClient, Settings);
     forecastClient       = new ForecastClient(httpClient, Settings);
 }
Example #2
0
 public WeatherController(IForecastClient forecastClient, IRequestFactory requestFactory)
 {
     _forecastClient = forecastClient;
     _requestFactory = requestFactory;
 }
Example #3
0
 /// <summary>
 /// Initialize new instance
 /// </summary>
 /// <param name="client">Http client</param>
 public ForecastRepository(IForecastClient client)
 {
     _client = client ?? throw new ArgumentNullException(nameof(client));
 }
Example #4
0
 public ForecastService(IForecastClient client, IForecastRepository repository)
 {
     _client     = client;
     _repository = repository;
 }