/
githubmirror
/
Files
Обзор
Документация
Войти
/
githubmirror
/
Files
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/Files.App/Actions/Content/Run/RunAsAdminAction.cs
34 строки
1 KB
0x5BFA
Code Quality: Generate ICommandManager, CommandManager and CommandCodes from [GeneratedRichCommand] (#17536)
04 сен 2025, 17:35
Не верифицирован
04 сен 2025, 17:35
d45ca74
Код
Авторство
О чём код?
// Copyright (c) Files Community // Licensed under the MIT License. using Files.Shared.Helpers; namespace Files.App.Actions { [GeneratedRichCommand] internal sealed partial class RunAsAdminAction : BaseRunAsAction { private readonly IContentPageContext ContentPageContext = Ioc.Default.GetRequiredService<IContentPageContext>(); public override string Label => Strings.RunAsAdministrator.GetLocalizedResource(); public override string Description => Strings.RunAsAdminDescription.GetLocalizedResource(); public override RichGlyph Glyph => new("\uE7EF"); public override bool IsExecutable => ContentPageContext.SelectedItem is not null && ContentPageContext.PageType != ContentPageTypes.RecycleBin && ContentPageContext.PageType != ContentPageTypes.ZipFolder && (FileExtensionHelpers.IsExecutableFile(ContentPageContext.SelectedItem.FileExtension) || (ContentPageContext.SelectedItem is IShortcutItem shortcut && shortcut.IsExecutable)); public RunAsAdminAction() : base("runas") { } } }