コード例 #1
0
        public void SetUpWithSettings(WeatherClientSettings settings, Func <Task <HttpResponseMessage> > mockResponseMessage)
        {
            var httpclient = MockHttpClient.GetMockClient(mockResponseMessage);

            client = new CurrentWeatherClient(httpclient, settings);
        }
コード例 #2
0
 /// <summary>
 /// Class constructor
 /// </summary>
 /// <param name="apiKey">The Openweathermap api key</param>
 public OpenWeatherMapClient(string apiKey)
 {
     CurrentWeather           = new CurrentWeatherClient(apiKey, OpenWeatherMapUrl);
     FiveDayThreeHourForecast = new FiveDayThreeHourForecastClient(apiKey, OpenWeatherMapUrl);
 }