97 references to ZipArchiveMode
BuildBoss (1)
Microsoft.Arcade.Common (5)
Microsoft.Build (2)
Microsoft.Build.Engine.UnitTests (2)
Microsoft.Build.Tasks.Core (1)
Microsoft.Build.Tasks.UnitTests (4)
Microsoft.DotNet.Build.Tasks.VisualStudio (1)
Microsoft.DotNet.Build.Tasks.VisualStudio.Tests (1)
Microsoft.DotNet.Helix.JobSender (3)
Microsoft.DotNet.Helix.Sdk (1)
Microsoft.DotNet.Internal.SymbolHelper (1)
Microsoft.DotNet.NuGetRepack.Tasks (1)
Microsoft.DotNet.NuGetRepack.Tests (2)
Microsoft.DotNet.SignCheckLibrary (4)
Microsoft.DotNet.SignTool (2)
Microsoft.DotNet.SourceBuild.Tasks (1)
Microsoft.DotNet.VersionTools (1)
Microsoft.ML.Core (2)
Microsoft.ML.TestFramework (1)
netstandard (1)
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.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.Packaging (13)