private RepositoryReader(Stream stream, IExceptionContext ectx, bool useFileSystem) : base(useFileSystem, ectx) { try { _archive = new ZipArchive(stream, ZipArchiveMode.Read, true); } catch (Exception ex) { throw ExceptionContext.ExceptDecode(ex, "Failed to open a zip archive"); } _entries = new Dictionary <string, ZipArchiveEntry>(); foreach (var entry in _archive.Entries) { var path = NormalizeForArchiveEntry(entry.FullName); _entries[path] = entry; } }