Exemple #1
0
        public async Task <CityWeather> GetWatherByCityCountryName(string cityName, string countryName)
        {
            CityWeatherServiceClient client = new CityWeatherServiceClient();
            var cityWeather = await client.GetWatherByCityCountryName(cityName, countryName);

            //the above will always return Data Not Found as the service data not available
            //so mock the data for mow
            return(new CityWeather
            {
                Location = cityName,
                Time = DateTime.Now.ToShortDateString(),
                Wind = "mock wind",
                Visibility = "mock visibility",
                SkyConditions = "mock skyConditions",
                Temperature = "mock temperature",
                DewPoing = "mock dewPoing",
                Humidity = "mock humidity",
                Pressure = "mock pressure"
            });
        }
Exemple #2
0
        public async Task <List <Table> > GetCitiesByCountryName(string countryName)
        {
            CityWeatherServiceClient client = new CityWeatherServiceClient();

            return(await client.GetWeatherByCountryName(countryName));
        }