Example #1
0
        private async void GetForecasts()
        {
            var forecasts = await ForecastAPIHelper.GetFiveDayForecast(SelectedLocation.Key);

            FiveDayForecast.Clear();
            foreach (var f in forecasts)
            {
                FiveDayForecast.Add(f);
            }
        }
Example #2
0
        public HomeController(IConfiguration config, LocationAPIHelper locationAPIHelper, CurrentConditionsAPIHelper currentConditionsAPIHelper, ForecastAPIHelper forecastAPIHelper, ILogger <HomeController> logger)
        {
            ViewModel = new HomeViewModel();

            _logger                    = logger;
            Configuration              = config;
            LocationAPIHelper          = locationAPIHelper;
            CurrentConditionsAPIHelper = currentConditionsAPIHelper;
            ForecastAPIHelper          = forecastAPIHelper;
        }