public async Task <IEnumerable <DrxDocument> > GetDocumentHeadersAsync() { var documents = new List <DrxDocument>(); var files = _storeFolder.EnumerateFiles(); foreach (var file in files.Where(f => f.Extension == ".drx")) { using (var stream = file.OpenRead()) documents.Add(DrxParser.DeserialiseHeader(stream)); } return(documents); }
public async Task <IEnumerable <DrxDocument> > GetDocumentHeadersAsync() { var documents = new List <DrxDocument>(); var files = await _storeFolder.GetFilesAsync(); foreach (var file in files.Where(f => Path.GetExtension(f.Path) == ".drx")) { using (var stream = await file.OpenAsync(FileAccessMode.Read)) documents.Add(DrxParser.DeserialiseHeader(stream.AsStreamForRead())); } return(documents); }