using System.Threading.Tasks;
using System.Collections.Generic;
public interface IWeatherProvider
Task<int> GetTemperatureAsync(string longitude, string latitude);
Task<int> GetHumidityAsync(string longitude, string latitude);
Task<IDictionary<string, WeatherForecast>> GetWeatherForecastAsync(IEnumerable<string> source);
public class WeatherForecast
public int Temperature { get; set; }
public int Humidity { get; set; }
public class WeatherProvider : IWeatherProvider
public Task<int> GetTemperatureAsync(string longitude, string latitude) => throw new NotImplementedException();
public Task<int> GetHumidityAsync(string longitude, string latitude) => throw new NotImplementedException();
public async Task<IDictionary<string, WeatherForecast>> GetWeatherForecastAsync(IEnumerable<string> coordinates)
private readonly IWeatherProvider _weatherProvider;
public Client(IWeatherProvider weatherProvider)
_weatherProvider = weatherProvider;
public void GetWeatherForecast()
var source = new string[] { "14.408080, 18.887114", "21.427503, 47.382691", "21.099875, 79.748037"};
_weatherProvider.GetWeatherForecastAsync(source);