コード例 #1
0
        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);
        }
コード例 #2
0
        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);
        }