Beispiel #1
0
 public HeWeatherModel(HeWeatherContract heweathercontract)
 {
     if (heweathercontract == null)
     {
         throw new ArgumentException("Value can't be null.");
     }
     Status            = ParseStatus(heweathercontract.status);
     Aqi               = new AQI(heweathercontract.aqi);
     DailyForecast     = GenerateDailyForecast(heweathercontract.daily_forecast);
     HourlyForecast    = GenerateHourlyForecast(heweathercontract.hourly_forecast);
     Alarms            = GenerateWeatherAlarms(heweathercontract.alarms);
     Location          = new Location(heweathercontract.basic);
     NowWeather        = new NowWeather(heweathercontract.now);
     WeatherSuggestion = new WeatherSuggestion(heweathercontract.suggestion);
 }
 public HeWeatherModel(HeWeatherContract heweathercontract)
 {
     if (heweathercontract == null)
         throw new ArgumentException("Value can't be null.");
     Status = ParseStatus(heweathercontract.status);
     Aqi = new AQI(heweathercontract.aqi);
     DailyForecast = GenerateDailyForecast(heweathercontract.daily_forecast);
     HourlyForecast = GenerateHourlyForecast(heweathercontract.hourly_forecast);
     Alarms = GenerateWeatherAlarms(heweathercontract.alarms);
     Location = new Location(heweathercontract.basic);
     NowWeather = new NowWeather(heweathercontract.now);
     WeatherSuggestion = new WeatherSuggestion(heweathercontract.suggestion);
 }