コード例 #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));
        }
コード例 #2
0
        public async Task <IEnumerable <DetailedWeatherSummary> > GetDataAsync()
        {
            string fileContent = await httpClient.GetStringAsync("api/get-weather-summary");

            return(WeatherForecastCsvParser.Parse(fileContent));
        }