1 instantiation of NamingStylePreferences
Microsoft.CodeAnalysis.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (1)
78return new NamingStylePreferences(
54 references to NamingStylePreferences
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (2)
Options\SolutionAnalyzerConfigOptionsUpdaterTests.cs (2)
113var initialPeferences = OptionsTestHelpers.CreateNamingStylePreferences( 158var hostPeferences = OptionsTestHelpers.CreateNamingStylePreferences(
Microsoft.CodeAnalysis.Workspaces (31)
Options\DocumentOptionSet.cs (1)
78Contract.ThrowIfTrue(internallyDefinedOption.Type == typeof(NamingStylePreferences));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeGeneration\CodeGenerationOptions.cs (2)
23[DataMember] public NamingStylePreferences NamingStyle { get; init; } = NamingStylePreferences.Default;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Diagnostics\StructuredAnalyzerConfigOptions.cs (5)
25private readonly Lazy<NamingStylePreferences> _lazyNamingStylePreferences; 31_lazyNamingStylePreferences = new Lazy<NamingStylePreferences>(() => EditorConfigNamingStyleParser.ParseDictionary(_options)); 41public override NamingStylePreferences GetNamingStylePreferences() 45=> _lazyNamingStylePreferences.Value is { IsEmpty: false } nonEmpty ? nonEmpty : _fallback?.GetNamingStylePreferences() ?? NamingStylePreferences.Empty; 50public abstract NamingStylePreferences GetNamingStylePreferences();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\AnalyzerConfigOptionsExtensions.cs (2)
25if (option.Definition.Type == typeof(NamingStylePreferences)) 29var preferences = structuredOptions.GetNamingStylePreferences();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (1)
17public static NamingStylePreferences ParseDictionary(AnalyzerConfigOptions allRawConventions)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyleOptions.cs (4)
23internal static PerLanguageOption2<NamingStylePreferences> NamingPreferences { get; } = new( 25defaultValue: NamingStylePreferences.Default, 27serializer: EditorConfigValueSerializer<NamingStylePreferences>.Unsupported); 37: OptionsProvider<NamingStylePreferences>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\NamingStylePreferences.cs (10)
23internal sealed class NamingStylePreferences : IEquatable<NamingStylePreferences> 338public static NamingStylePreferences Default { get; } = FromXElement(XElement.Parse(DefaultNamingPreferencesString)); 339public static NamingStylePreferences Empty { get; } = new([], [], ImmutableArray<NamingRule>.Empty); 355internal static NamingStylePreferences FromXElement(XElement element) 366=> Equals(obj as NamingStylePreferences); 368public bool Equals(NamingStylePreferences? other) 378public static bool operator ==(NamingStylePreferences? left, NamingStylePreferences? right) 392public static bool operator !=(NamingStylePreferences left, NamingStylePreferences right)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\NamingStylePreferencesEditorConfigSerializer.cs (1)
19public static void AppendToEditorConfig(this NamingStylePreferences namingStylePreferences, string language, StringBuilder editorconfig)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\EditorConfigValueSerializer.cs (1)
181if (value is NamingStylePreferences preferences)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\OptionDefinition.cs (1)
104type == typeof(NamingStylePreferences) ||
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\NamingStyles\NamingStylePreferencesProviders.cs (1)
15public static async ValueTask<NamingStylePreferences> GetNamingStylePreferencesAsync(this Document document, CancellationToken cancellationToken)
Workspace\Solution\ProjectState.cs (2)
580public override NamingStylePreferences GetNamingStylePreferences() 581=> NamingStylePreferences.Empty;
Microsoft.CodeAnalysis.Workspaces.UnitTests (21)
EditorConfigStorageLocation\NamingStylePreferenceEditorConfigStorageLocationTests.cs (2)
18var value = options.GetNamingStylePreferences(); 35var value = options.GetNamingStylePreferences();
Options\EditorConfigNamingStyleParserTests.cs (18)
31var result = OptionsTestHelpers.ParseNamingStylePreferences(dictionary); 79var result = OptionsTestHelpers.ParseNamingStylePreferences(dictionary); 101var result = OptionsTestHelpers.ParseNamingStylePreferences(dictionary); 143var result = OptionsTestHelpers.ParseNamingStylePreferences(dictionary); 159var result = OptionsTestHelpers.ParseNamingStylePreferences(dictionary); 207var result = OptionsTestHelpers.ParseNamingStylePreferences(dictionary); 249var result = OptionsTestHelpers.ParseNamingStylePreferences(dictionary); 292var result = OptionsTestHelpers.ParseNamingStylePreferences(dictionary); 328var result = OptionsTestHelpers.ParseNamingStylePreferences(dictionary); 361var result = OptionsTestHelpers.ParseNamingStylePreferences(rule); 391var result = OptionsTestHelpers.ParseNamingStylePreferences(rule); 415var csharpResult = OptionsTestHelpers.ParseNamingStylePreferences(charpRule); 416var vbResult = OptionsTestHelpers.ParseNamingStylePreferences(vbRule); 438var result = OptionsTestHelpers.ParseNamingStylePreferences(rule); 484var namingStylePreferences = OptionsTestHelpers.ParseNamingStylePreferences(new Dictionary<string, string>() 520var namingStylePreferences = OptionsTestHelpers.ParseNamingStylePreferences(new Dictionary<string, string>() 556var namingStylePreferences = OptionsTestHelpers.ParseNamingStylePreferences(new Dictionary<string, string>() 598var result = OptionsTestHelpers.ParseNamingStylePreferences(dictionary);
Options\NamingStylePreferencesTests.cs (1)
21var preferences = NamingStylePreferences.FromXElement(XElement.Parse(serializedPreferences));