Esempio n. 1
0
 public DomainWeather(double humidity, double temperature, string cityKey, Wind wind, Precipitation precipitation)
 {
     Humidity      = humidity;
     Temperature   = temperature;
     CityKey       = cityKey;
     Wind          = wind;
     Precipitation = precipitation;
 }
Esempio n. 2
0
        public static DomainWeather ToDomainWeather(CurrentWeatherResponse currentWeatherResponse)
        {
            var wind          = new Wind(currentWeatherResponse.Wind.Speed, currentWeatherResponse.Wind.Deg);
            var precipitation = new Precipitation(currentWeatherResponse.Weather[0].Description);

            return(new DomainWeather(currentWeatherResponse.Main.Humidity, currentWeatherResponse.Main.Temp,
                                     currentWeatherResponse.Name, wind, precipitation));
        }