Ejemplo n.º 1
0
        /// <summary>
        /// Call forecast service to update the data
        /// </summary>
        public async void RequestForecast()
        {
            try
            {
                Loading = true;
                Error   = false;
                var channel = await _forecastService.GetWeatherForPlaceAsync(_place);

                if (channel == null)
                {
                    Error = true;
                }
                else
                {
                    ParseForecast(channel);
                }
            }
            catch (Exception exception)
            {
                Debug.WriteLine(exception.Message);
                Error = true;
            }
            finally
            {
                Loading = false;
            }
        }