/
githubmirror
/
roslyn
Обзор
Документация
Войти
/
githubmirror
/
roslyn
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/VisualStudio/Core/Def/Options/NamingPreferencesReadFallback.cs
24 строки
1 KB
Cyrus Najmabadi
Further settings simplification
02 дек 2025, 18:35
02 дек 2025, 18:35
c13519b
Код
Авторство
О чём код?
// 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 System; using System.Composition; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CodeStyle; using Microsoft.CodeAnalysis.Diagnostics.Analyzers.NamingStyles; using Microsoft.CodeAnalysis.Host.Mef; namespace Microsoft.VisualStudio.LanguageServices.Options; [ExportVisualStudioStorageReadFallback(NamingStyleOptions.NamingPreferencesOptionName), Shared] [method: ImportingConstructor] [method: Obsolete(MefConstruction.ImportingConstructorMessage, error: true)] internal sealed class NamingPreferencesReadFallback() : IVisualStudioStorageReadFallback { public Optional<object?> TryRead(string? language, TryReadValueDelegate readValue) { Contract.ThrowIfNull(language); return readValue($"TextEditor.{language}.Specific.NamingPreferences", typeof(NamingStylePreferences)); } }