コード例 #1
0
        public async Task Load()
        {
            IEnumerable <CoronavirusCountry> countries = await _coronavirusCountryService.GetTopCases(AMOUNT_OF_COUNTRIES);

            CoronavirusCountryCaseCounts = new ChartValues <int>(countries.Select(c => c.CaseCount));
            CoronavirusCountryNames      = countries.Select(c => c.CountryName).ToArray();
        }
コード例 #2
0
        public async Task Load()
        {
            IEnumerable <CoronavirusCountry> countries = await _coronavirusCountryServices.GetTopCases(AMOUNT_OF_COUNTRY);

            CoronavirusCountryCaseCounts = new ChartValues <int>(countries.Select(c => c.CaseCount));
            CoronavirusCountryNames      = new ObservableCollection <string>(countries.Select(c => c.CountryName));
        }
コード例 #3
0
        public async Task Load()
        {
            IEnumerable<CoronavirusCountry> countries = await _coronavirusCountryService.GetTopCases(AMOUNT_OF_COUNTRIES);

            CoronavirusCountryCaseCounts = new ChartValues<int>(countries.Select(c => c.CaseCount));

            CoronavirusCountryNames.Clear();
            foreach (string countryName in countries.Select(c => c.CountryName))
            {
                CoronavirusCountryNames.Add(countryName);
            }
        }
コード例 #4
0
 public IActionResult Index()
 {
     return(View(_coronavirusCountryService.GetTopCases(10).Result.ToList()));
 }
コード例 #5
0
 private async Task Load()
 {
     _coronaData = await _coronavirusCountryService.GetTopCases(AMOUNT_OF_CASES);
 }