示例#1
0
        private async Task FetchWeather()
        {
            var forecast = new Forecast();

            Console.WriteLine("Got here ");
            try
            {
                forecast = await _weatherService.FetchWeather(CityName);
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }
            Console.WriteLine(forecast.Base.ToString());
            if (forecast != null)
            {
                await _navigationService.Navigate <WeatherDetailsViewModel, Forecast>(forecast);
            }
        }