public void UpdateWeatherInfo() { CityWeather cityWeather = new CityWeather(); var weatherDataManager = new WeatherDataManager(); string[] allCities = weatherDataManager.GetAllCities(); foreach (string c in allCities) { Thread.Sleep(1000); // sleep 1s to avoid throttle this.QueryOpenWeatherAndUpdateTable(cityWeather, weatherDataManager, c); } }
public string[] GetAllCities() { var weatherDataManager = new WeatherDataManager(); return(weatherDataManager.GetAllCities()); }