/
githubmirror
/
PowerShell
Обзор
Документация
Войти
/
githubmirror
/
PowerShell
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
src/Microsoft.Management.UI.Internal/ManagementList/Common/InverseBooleanConverter.cs
45 строк
2 KB
CarloToso
Replace ArgumentNullException(nameof()) -> ArgumentNullException.ThrowIfNull() (#18784)
14 дек 2022, 16:30
Не верифицирован
14 дек 2022, 16:30
2ddc63f
Код
Авторство
О чём код?
// Copyright (c) Microsoft Corporation. // Licensed under the MIT License. using System; using System.Windows.Data; namespace Microsoft.Management.UI.Internal { /// <summary> /// Takes a bool value and returns the inverse. /// </summary> [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.MSInternal", "CA903:InternalNamespaceShouldNotContainPublicTypes")] public class InverseBooleanConverter : IValueConverter { /// <summary> /// Converts a boolean value to be it's inverse. /// </summary> /// <param name="value">The source value.</param> /// <param name="targetType">The parameter is not used.</param> /// <param name="parameter">The parameter is not used.</param> /// <param name="culture">The parameter is not used.</param> /// <returns>The inverted boolean value.</returns> public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { ArgumentNullException.ThrowIfNull(value); var boolValue = (bool)value; return !boolValue; } /// <summary> /// This method is not used. /// </summary> /// <param name="value">The parameter is not used.</param> /// <param name="targetType">The parameter is not used.</param> /// <param name="parameter">The parameter is not used.</param> /// <param name="culture">The parameter is not used.</param> /// <returns>The parameter is not used.</returns> public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } }