/
githubmirror
/
Files
Обзор
Документация
Войти
/
githubmirror
/
Files
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/Files.App/Actions/Content/Archives/Compress/CompressIntoZipAction.cs
39 строк
1 KB
yair100
Code Quality: Add Category, ExtendedLabel, AutomationId and AccessKey to actions (#18308)
27 мар 2026, 00:40
Не верифицирован
27 мар 2026, 00:40
6ef1f17
Код
Авторство
О чём код?
// Copyright (c) Files Community // Licensed under the MIT License. namespace Files.App.Actions { [GeneratedRichCommand] internal sealed partial class CompressIntoZipAction : BaseCompressArchiveAction { public override string Label => string.Format(Strings.CreateNamedArchive.GetLocalizedResource(), $"{StorageArchiveService.GenerateArchiveNameFromItems(context.SelectedItems)}.zip"); public override string ExtendedLabel => Strings.CompressIntoZip.GetLocalizedResource(); public override string Description => Strings.CompressIntoZipDescription.GetLocalizedFormatResource(context.SelectedItems.Count); public CompressIntoZipAction() { } public override Task ExecuteAsync(object? parameter = null) { if (context.ShellPage is null) return Task.CompletedTask; GetDestination(out var sources, out var directory, out var fileName); ICompressArchiveModel compressionModel = new CompressArchiveModel( sources, directory, fileName, Environment.ProcessorCount, fileFormat: ArchiveFormats.Zip); return StorageArchiveService.CompressAsync(compressionModel); } } }