コード例 #1
0
        private async Task <IEnumerable <Permit> > ReadCsv(ICacheEntry entry)
        {
            entry.AbsoluteExpiration = DateTimeOffset.UtcNow.AddHours(_options.CsvFileExpirationInHours);
            using var csvFile        = await _blobProvider.GetCsvAsync();

            using var reader = new StreamReader(csvFile);
            using var csv    = new CsvReader(reader, CultureInfo.InvariantCulture);
            return(csv.GetRecords <Permit>().ToList());
        }