38 instantiations of ZipArchive
Aspire.Dashboard (2)
Aspire.Dashboard.Tests (6)
BuildBoss (1)
Microsoft.Arcade.Common (3)
Microsoft.DotNet.Build.Tasks.VisualStudio (1)
Microsoft.DotNet.Build.Tasks.VisualStudio.Tests (1)
Microsoft.DotNet.Helix.JobSender (3)
Microsoft.DotNet.NuGetRepack.Tasks (1)
Microsoft.DotNet.NuGetRepack.Tests (2)
Microsoft.DotNet.SignCheckLibrary (1)
Microsoft.DotNet.SignTool (3)
Microsoft.DotNet.SourceBuild.Tasks (1)
Microsoft.ML.Core (2)
Microsoft.ML.Ensemble (2)
Microsoft.ML.TestFramework (1)
System.IO.Compression (3)
System.IO.Compression.ZipFile (3)
System.IO.Packaging (2)
126 references to ZipArchive
Aspire.Dashboard (8)
Model\TelemetryExportService.cs (7)
57using (var archive = new ZipArchive(memoryStream, ZipArchiveMode.Create, leaveOpen: true))
127private async Task ExportConsoleLogsAsync(ZipArchive archive, HashSet<string> resourceNames, CancellationToken cancellationToken)
145private static void ExportResources(ZipArchive archive, List<ResourceViewModel> resources)
158private void ExportStructuredLogs(ZipArchive archive, List<OtlpResource> resources)
175private void ExportTraces(ZipArchive archive, List<OtlpResource> resources)
192private void ExportMetrics(ZipArchive archive, List<OtlpResource> resources)
694private static void WriteJsonToArchive<T>(ZipArchive archive, string path, T data)
Aspire.Dashboard.Tests (6)
BuildBoss (1)
Microsoft.Arcade.Common (5)
Microsoft.AspNetCore.App.UnitTests (2)
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 (2)
Microsoft.DotNet.NuGetRepack.Tasks (1)
Microsoft.DotNet.NuGetRepack.Tests (2)
Microsoft.DotNet.SignCheckLibrary (5)
Microsoft.DotNet.SignTool (4)
Microsoft.DotNet.SourceBuild.Tasks (1)
Microsoft.ML.Core (4)
Microsoft.ML.Ensemble (4)
Microsoft.ML.IntegrationTests (1)
Microsoft.ML.TestFramework (1)
netstandard (1)
System.IO.Compression (24)
System\IO\Compression\ZipArchive.Async.cs (5)
16/// Asynchronously initializes and returns a new instance of <see cref="ZipArchive"/> on the given stream in the specified mode, specifying whether to leave the stream open, with an optional encoding and an optional cancellation token.
66/// <returns>A task that represents the asynchronous initialization. The task result is a <see cref="ZipArchive"/> instance opened on the provided stream.</returns>
67public static async Task<ZipArchive> CreateAsync(Stream stream, ZipArchiveMode mode, bool leaveOpen, Encoding? entryNameEncoding, CancellationToken cancellationToken = default)
87ZipArchive zipArchive = new(mode, leaveOpen, entryNameEncoding, backingStream, DecideArchiveStream(mode, stream));
135/// Asynchronously releases the resources used by the <see cref="ZipArchive"/>.
System.IO.Compression.ZipFile (34)
System\IO\Compression\ZipFile.Create.Async.cs (11)
35/// <returns>A task that represents the asynchronous operation. The task result is an opened <see cref="ZipArchive"/> in <see cref="ZipArchiveMode.Read"/> mode.</returns>
36public static Task<ZipArchive> OpenReadAsync(string archiveFileName, CancellationToken cancellationToken = default) => OpenAsync(archiveFileName, ZipArchiveMode.Read, cancellationToken);
75/// <returns>A task that represents the asynchronous operation. The task result is an opened <see cref="ZipArchive"/> in the requested <paramref name="mode"/>.</returns>
76public static Task<ZipArchive> OpenAsync(string archiveFileName, ZipArchiveMode mode, CancellationToken cancellationToken = default) => OpenAsync(archiveFileName, mode, entryNameEncoding: null, cancellationToken);
154/// <returns>A task that represents the asynchronous operation. The task result is an opened <see cref="ZipArchive"/> in the requested <paramref name="mode"/>.</returns>
155public static async Task<ZipArchive> OpenAsync(string archiveFileName, ZipArchiveMode mode, Encoding? entryNameEncoding, CancellationToken cancellationToken = default)
168return await ZipArchive.CreateAsync(fs, mode, leaveOpen: false, entryNameEncoding: entryNameEncoding, cancellationToken).ConfigureAwait(false);
445ZipArchive archive = await OpenAsync(destinationArchiveFileName, ZipArchiveMode.Create, entryNameEncoding, cancellationToken).ConfigureAwait(false);
459ZipArchive archive = await ZipArchive.CreateAsync(destination, ZipArchiveMode.Create, leaveOpen: true, entryNameEncoding, cancellationToken).ConfigureAwait(false);
466private static async Task CreateZipArchiveFromDirectoryAsync(string sourceDirectoryName, ZipArchive archive,
System\IO\Compression\ZipFile.Create.cs (7)
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)
413using ZipArchive archive = Open(destinationArchiveFileName, ZipArchiveMode.Create, entryNameEncoding);
422using ZipArchive archive = new ZipArchive(destination, ZipArchiveMode.Create, leaveOpen: true, entryNameEncoding);
426private static void CreateZipArchiveFromDirectory(string sourceDirectoryName, ZipArchive archive,
531private static void FinalizeCreateZipArchiveFromDirectory(ZipArchive archive, DirectoryInfo di, bool includeBaseDirectory, bool directoryIsEmpty)
System.IO.Packaging (14)