Пример #1
0
        public IEnumerable <string> GetCities(string countryName)
        {
            var content = _webserviceClient.GetService()
                          .GetCitiesByCountry(countryName);

            var xDoc = XDocument.Parse(content);

            return(xDoc.Descendants()
                   .Elements("Table")
                   .Select(e => e.Element("City").Value));
        }
Пример #2
0
        public Country GetWeather(string countryName, string cityName)
        {
            var content = _webserviceClient.GetService()
                          .GetWeather(cityName, countryName);

            var xDoc = XDocument.Parse(content);

            // NOTE: So far I could not find a city with data from this service. Difficult write the code without seeing definitions

            return(new Country());
        }