/
githubmirror
/
roslyn
Обзор
Документация
Войти
/
githubmirror
/
roslyn
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/Analyzers/CSharp/CodeFixes/UseIsNullCheck/UseIsNullCheckHelpers.cs
27 строк
890 B
Cyrus Najmabadi
Update c# features to use file scoped namespaces
28 фев 2024, 00:31
28 фев 2024, 00:31
17e64d5
Код
Авторство
О чём код?
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using Microsoft.CodeAnalysis.CSharp.Extensions; namespace Microsoft.CodeAnalysis.CSharp.UseIsNullCheck; internal static class UseIsNullCheckHelpers { public static string GetTitle(bool negated, ParseOptions options) { if (negated) { return SupportsIsNotPattern(options) ? CSharpAnalyzersResources.Use_is_not_null_check : CSharpAnalyzersResources.Use_is_object_check; } else { return CSharpAnalyzersResources.Use_is_null_check; } } public static bool SupportsIsNotPattern(ParseOptions options) => options.LanguageVersion() >= LanguageVersion.CSharp9; }