// Десериализация. private WeatherResponce SetWeatherResponce(string weather) { if (!TestForNullOrEmpty(weather)) { weatherResponce = JsonConvert.DeserializeObject<WeatherResponce>(weather); } return weatherResponce; }
/// <summary> /// Поверка на NULL. /// </summary> private bool IsNullWeather(WeatherResponce weatherResponce) { if (weatherResponce == null) { return true; } if(weatherResponce.Main == null && weatherResponce.Sys == null) { return true; } return false; }