97 references to ZipArchiveMode
BuildBoss (1)
OptProfCheckerUtil.cs (1)
103using (var archive = new ZipArchive(File.Open(vsixFullPath, FileMode.Open), ZipArchiveMode.Read))
Microsoft.Arcade.Common (5)
IZipArchiveManager.cs (1)
17ZipArchive OpenArchive(string archivePath, ZipArchiveMode mode);
ZipArchiveManager.cs (4)
15public ZipArchive OpenArchive(string archivePath, ZipArchiveMode mode) 33using ZipArchive zip = new(fs, archiveExists ? ZipArchiveMode.Update : ZipArchiveMode.Create, false); 50using ZipArchive archive = new(archiveStream, ZipArchiveMode.Update);
Microsoft.Build (2)
Logging\BinaryLogger\BuildEventArgsReader.cs (1)
408using var zipArchive = new ZipArchive(embeddedStream, ZipArchiveMode.Read);
Logging\BinaryLogger\ProjectImportsCollector.cs (1)
83_zipArchive = new ZipArchive(_fileStream, ZipArchiveMode.Create);
Microsoft.Build.Engine.UnitTests (2)
BinaryLogger_Tests.cs (2)
461using var zipArchive = new ZipArchive(fileStream, ZipArchiveMode.Read); 521using var zipArchive = new ZipArchive(fileStream, ZipArchiveMode.Read);
Microsoft.Build.Tasks.Core (1)
Unzip.cs (1)
120using (ZipArchive zipArchive = new ZipArchive(stream, ZipArchiveMode.Read, leaveOpen: false))
Microsoft.Build.Tasks.UnitTests (4)
CodeTaskFactoryEmbeddedFileInBinlogTestHelper.cs (2)
68using var zipArchive = new ZipArchive(fileStream, ZipArchiveMode.Read); 120using var zipArchive = new ZipArchive(fileStream, ZipArchiveMode.Read);
ZipDirectory_Tests.cs (2)
47using (ZipArchive archive = new ZipArchive(stream, ZipArchiveMode.Read)) 89using (ZipArchive archive = new ZipArchive(stream, ZipArchiveMode.Read))
Microsoft.DotNet.Build.Tasks.VisualStudio (1)
OptProf\GenerateTrainingInputFiles.cs (1)
99using (var archive = new ZipArchive(File.Open(vsixPath, FileMode.Open), ZipArchiveMode.Read))
Microsoft.DotNet.Build.Tasks.VisualStudio.Tests (1)
OptProf\GenerateTrainingInputFilesTests.cs (1)
122using (var archive = new ZipArchive(fileStream, ZipArchiveMode.Create))
Microsoft.DotNet.Helix.JobSender (3)
Payloads\AdhocPayload.cs (1)
34using (var zip = new ZipArchive(stream, ZipArchiveMode.Create, true))
Payloads\DirectoryPayload.cs (1)
56using (var zip = new ZipArchive(stream, ZipArchiveMode.Create, true))
Payloads\SingleFilePayload.cs (1)
38using (var zip = new ZipArchive(stream, ZipArchiveMode.Create, true))
Microsoft.DotNet.Helix.Sdk (1)
ProvisioningProfileProvider.cs (1)
124using ZipArchive zipArchive = _zipArchiveManager.OpenArchive(archivePath, ZipArchiveMode.Update);
Microsoft.DotNet.Internal.SymbolHelper (1)
SymbolUploadHelper.cs (1)
273using ZipArchive archive = ZipFile.Open(packagePath, ZipArchiveMode.Read);
Microsoft.DotNet.NuGetRepack.Tasks (1)
src\ReplacePackageParts.cs (1)
232using (var archive = new ZipArchive(File.Open(tempPackagePath, FileMode.Open, FileAccess.ReadWrite), ZipArchiveMode.Update))
Microsoft.DotNet.NuGetRepack.Tests (2)
ReplacePackagePartsTests.cs (1)
43using (var archive = new ZipArchive(File.Open(task.NewPackage, FileMode.Open, FileAccess.Read), ZipArchiveMode.Read))
VersionUpdaterTests.cs (1)
23using (var package = new ZipArchive(new MemoryStream(packageBytes), ZipArchiveMode.Read))
Microsoft.DotNet.SignCheckLibrary (4)
Verification\Jar\JarFile.cs (1)
177using (ZipArchive archive = ZipFile.Open(ArchivePath, ZipArchiveMode.Read))
Verification\Jar\JarManifestFile.cs (1)
41using (ZipArchive archive = ZipFile.Open(ArchivePath, ZipArchiveMode.Read))
Verification\Jar\JarManifestFileBase.cs (1)
93using (ZipArchive archive = ZipFile.Open(ArchivePath, ZipArchiveMode.Read))
Verification\Jar\JarUtils.cs (1)
25using (ZipArchive archive = ZipFile.Open(archivePath, ZipArchiveMode.Read))
Microsoft.DotNet.SignTool (2)
src\ZipData.cs (2)
140using var archive = new ZipArchive(File.OpenRead(archivePath), ZipArchiveMode.Read, leaveOpen: false); 166using (var archive = new ZipArchive(zipStream, ZipArchiveMode.Update))
Microsoft.DotNet.SourceBuild.Tasks (1)
src\UsageReport\WritePackageUsageData.cs (1)
157ZipArchiveMode.Create))
Microsoft.DotNet.VersionTools (1)
Automation\NupkgInfoFactory.cs (1)
37ZipArchive zipArchive = new(stream, ZipArchiveMode.Read);
Microsoft.ML.Core (2)
Data\Repository.cs (2)
306_archive = new ZipArchive(stream, ZipArchiveMode.Create, leaveOpen: true); 462_archive = new ZipArchive(stream, ZipArchiveMode.Read, true);
Microsoft.ML.TestFramework (1)
DataPipe\TestDataPipe.cs (1)
1058using (var zip = new ZipArchive(strm, ZipArchiveMode.Read))
netstandard (1)
netstandard.cs (1)
897[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.IO.Compression.ZipArchiveMode))]
System.IO.Compression (37)
System\IO\Compression\ZipArchive.cs (26)
20private readonly ZipArchiveMode _mode; 45public ZipArchive(Stream stream) : this(stream, ZipArchiveMode.Read, leaveOpen: false, entryNameEncoding: null) { } 56public ZipArchive(Stream stream, ZipArchiveMode mode) : this(stream, mode, leaveOpen: false, entryNameEncoding: null) { } 68public ZipArchive(Stream stream, ZipArchiveMode mode, bool leaveOpen) : this(stream, mode, leaveOpen, entryNameEncoding: null) { } 120public ZipArchive(Stream stream, ZipArchiveMode mode, bool leaveOpen, Encoding? entryNameEncoding) 134case ZipArchiveMode.Create: 138case ZipArchiveMode.Read: 149case ZipArchiveMode.Update: 159if (mode == ZipArchiveMode.Create && !stream.CanSeek) 164if (mode == ZipArchiveMode.Create) 180case ZipArchiveMode.Create: 183case ZipArchiveMode.Read: 186case ZipArchiveMode.Update: 188Debug.Assert(mode == ZipArchiveMode.Update); 217/// The comment encoding is determined by the <c>entryNameEncoding</c> parameter of the <see cref="ZipArchive(Stream,ZipArchiveMode,bool,Encoding?)"/> constructor. 237if (_mode == ZipArchiveMode.Create) 250public ZipArchiveMode Mode 305case ZipArchiveMode.Read: 307case ZipArchiveMode.Create: 308case ZipArchiveMode.Update: 310Debug.Assert(_mode == ZipArchiveMode.Update || _mode == ZipArchiveMode.Create); 346if (_mode == ZipArchiveMode.Create) 396if (_mode == ZipArchiveMode.Read) 497bool saveExtraFieldsAndComments = Mode == ZipArchiveMode.Update; 636if (_mode == ZipArchiveMode.Update)
System\IO\Compression\ZipArchiveEntry.cs (11)
147if (_archive.Mode == ZipArchiveMode.Create) 197///The comment encoding is determined by the <c>entryNameEncoding</c> parameter of the <see cref="ZipArchive(Stream,ZipArchiveMode,bool,Encoding?)"/> constructor. 268if (_archive.Mode == ZipArchiveMode.Read) 270if (_archive.Mode == ZipArchiveMode.Create && _everOpenedForWrite) 312if (_archive.Mode != ZipArchiveMode.Update) 335case ZipArchiveMode.Read: 337case ZipArchiveMode.Create: 339case ZipArchiveMode.Update: 341Debug.Assert(_archive.Mode == ZipArchiveMode.Update); 889if (_archive.Mode == ZipArchiveMode.Create && _archive.ArchiveStream.CanSeek == false) 1007if (_archive.Mode == ZipArchiveMode.Update || !_everOpenedForWrite)
System.IO.Compression.ZipFile (10)
System\IO\Compression\ZipFile.Create.cs (8)
31public static ZipArchive OpenRead(string archiveFileName) => Open(archiveFileName, ZipArchiveMode.Read); 68public static ZipArchive Open(string archiveFileName, ZipArchiveMode mode) => Open(archiveFileName, mode, entryNameEncoding: null); 144public static ZipArchive Open(string archiveFileName, ZipArchiveMode mode, Encoding? entryNameEncoding) 154case ZipArchiveMode.Read: 160case ZipArchiveMode.Create: 166case ZipArchiveMode.Update: 445using ZipArchive archive = Open(destinationArchiveFileName, ZipArchiveMode.Create, entryNameEncoding); 466using ZipArchive archive = new ZipArchive(destination, ZipArchiveMode.Create, leaveOpen: true, entryNameEncoding);
System\IO\Compression\ZipFile.Extract.cs (2)
185using (ZipArchive archive = Open(sourceArchiveFileName, ZipArchiveMode.Read, entryNameEncoding)) 328using ZipArchive archive = new ZipArchive(source, ZipArchiveMode.Read, leaveOpen: true, entryNameEncoding);
System.IO.Packaging (13)
System\IO\Packaging\ZipPackage.cs (12)
320ZipArchiveMode zipArchiveMode = ZipArchiveMode.Update; 322zipArchiveMode = ZipArchiveMode.Read; 324zipArchiveMode = ZipArchiveMode.Create; 326zipArchiveMode = ZipArchiveMode.Update; 390ZipArchiveMode zipArchiveMode = ZipArchiveMode.Update; 392zipArchiveMode = ZipArchiveMode.Read; 394zipArchiveMode = ZipArchiveMode.Create; 396zipArchiveMode = ZipArchiveMode.Update; 783if (_zipArchive.Mode == ZipArchiveMode.Read || _zipArchive.Mode == ZipArchiveMode.Update)
System\IO\Packaging\ZipPackagePart.cs (1)
33if (streamFileMode == FileMode.Create && _zipArchiveEntry.Archive.Mode != ZipArchiveMode.Create)