Esempio n. 1
0
        public async Task <IEnumerable <DetailedWeatherSummary> > GetDataAsync()
        {
            if (summary == null)
            {
                string fileContent = await fileContentProvider.GetFileContentAsync();

                summary = WeatherForecastCsvParser.Parse(fileContent);
            }
            return(await Task.FromResult(summary));
        }
        public async Task <IEnumerable <DetailedWeatherSummary> > GetDataAsync()
        {
            string fileContent = await httpClient.GetStringAsync("api/get-weather-summary");

            return(WeatherForecastCsvParser.Parse(fileContent));
        }