private static HeWeatherStatus ParseStatus_W(WunderGroundContract w) { if (w != null && w.response != null && w.current_observation != null) { return HeWeatherStatus.ok; } else { return HeWeatherStatus.no_response; } }
public HeWeatherModel(WunderGroundContract wun) { if (null == wun) { return; } Status = ParseStatus_W(wun); NowWeather = new NowWeather(wun.current_observation); DailyForecast = GenerateDailyForecast(wun.forecast.simpleforecast.forecastday); HourlyForecast = GenerateHourlyForecast(wun.hourly_forecast); Location = new Location(wun.current_observation); }