/
githubmirror
/
PowerToys
Обзор
Документация
Войти
/
githubmirror
/
PowerToys
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/modules/EnvironmentVariables/EnvironmentVariablesUILib/Helpers/ElevationHelper.cs
22 строки
677 B
Stefan Markovic
[EnvVar][Hosts][RegPrev]Decouple and refactor to make it "packable" as nuget package (#32604)
26 апр 2024, 20:41
Не верифицирован
26 апр 2024, 20:41
41a0114
Код
Авторство
О чём код?
// Copyright (c) Microsoft Corporation // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System.Security.Principal; namespace EnvironmentVariablesUILib.Helpers { public class ElevationHelper : IElevationHelper { private readonly bool _isElevated; public bool IsElevated => _isElevated; public ElevationHelper() { _isElevated = new WindowsPrincipal(WindowsIdentity.GetCurrent()).IsInRole(WindowsBuiltInRole.Administrator); } public static IElevationHelper ElevationHelperInstance { get; set; } } }