Пример #1
0
        public IEnumerable <Blob> RetrieveSnapshot(
            int snapshotId,
            Fuzzy includeFuzzy,
            Func <string, Stream> openWrite)
        {
            openWrite.EnsureNotNull(nameof(openWrite));

            var snapshot = GetSnapshot(snapshotId);
            var blobs    = Filter(snapshot, includeFuzzy)
                           .AsParallel()
                           .Select(blobReference =>
            {
                using var stream = openWrite(blobReference.Name);

                RetrieveContent(
                    blobReference.ContentUris,
                    stream);

                _probe.RetrievedBlob(blobReference);

                return(blobReference.ToBlob());
            })
                           .ToArray();

            _probe.RetrievedSnapshot(snapshot.SnapshotId);

            return(blobs);
        }