1 instantiation of NamingStylePreferences
Microsoft.CodeAnalysis.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (1)
42
var preferences = new
NamingStylePreferences
(
54 references to NamingStylePreferences
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (18)
Diagnostics\NamingStyles\EditorConfigNamingStyleParserTests.cs (18)
33
var
result = OptionsTestHelpers.ParseNamingStylePreferences(dictionary);
81
var
result = OptionsTestHelpers.ParseNamingStylePreferences(dictionary);
103
var
result = OptionsTestHelpers.ParseNamingStylePreferences(dictionary);
145
var
result = OptionsTestHelpers.ParseNamingStylePreferences(dictionary);
161
var
result = OptionsTestHelpers.ParseNamingStylePreferences(dictionary);
209
var
result = OptionsTestHelpers.ParseNamingStylePreferences(dictionary);
251
var
result = OptionsTestHelpers.ParseNamingStylePreferences(dictionary);
294
var
result = OptionsTestHelpers.ParseNamingStylePreferences(dictionary);
330
var
result = OptionsTestHelpers.ParseNamingStylePreferences(dictionary);
363
var
result = OptionsTestHelpers.ParseNamingStylePreferences(rule);
393
var
result = OptionsTestHelpers.ParseNamingStylePreferences(rule);
417
var
csharpResult = OptionsTestHelpers.ParseNamingStylePreferences(charpRule);
418
var
vbResult = OptionsTestHelpers.ParseNamingStylePreferences(vbRule);
440
var
result = OptionsTestHelpers.ParseNamingStylePreferences(rule);
486
var
namingStylePreferences = OptionsTestHelpers.ParseNamingStylePreferences(new Dictionary<string, string>()
522
var
namingStylePreferences = OptionsTestHelpers.ParseNamingStylePreferences(new Dictionary<string, string>()
558
var
namingStylePreferences = OptionsTestHelpers.ParseNamingStylePreferences(new Dictionary<string, string>()
600
var
result = OptionsTestHelpers.ParseNamingStylePreferences(dictionary);
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (1)
Options\SolutionAnalyzerConfigOptionsUpdaterTests.cs (1)
143
var
hostPeferences = OptionsTestHelpers.CreateNamingStylePreferences(
Microsoft.CodeAnalysis.Workspaces (32)
Options\DocumentOptionSet.cs (1)
78
Contract.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)
25
private readonly Lazy<
NamingStylePreferences
> _lazyNamingStylePreferences;
31
_lazyNamingStylePreferences = new Lazy<
NamingStylePreferences
>(() => EditorConfigNamingStyleParser.ParseDictionary(_options));
41
public override
NamingStylePreferences
GetNamingStylePreferences()
45
=> _lazyNamingStylePreferences.Value is { IsEmpty: false } nonEmpty ? nonEmpty : _fallback?.GetNamingStylePreferences() ??
NamingStylePreferences
.Empty;
50
public abstract
NamingStylePreferences
GetNamingStylePreferences();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\AnalyzerConfigOptionsExtensions.cs (2)
25
if (option.Definition.Type == typeof(
NamingStylePreferences
))
29
var
preferences = structuredOptions.GetNamingStylePreferences();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (2)
16
public static
NamingStylePreferences
ParseDictionary(AnalyzerConfigOptions allRawConventions)
42
var
preferences = new NamingStylePreferences(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyleOptions.cs (4)
24
internal static PerLanguageOption2<
NamingStylePreferences
> NamingPreferences { get; } = new(
26
defaultValue:
NamingStylePreferences
.Default,
28
serializer: EditorConfigValueSerializer<
NamingStylePreferences
>.Unsupported);
33
: OptionsProvider<
NamingStylePreferences
>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\NamingStylePreferences.cs (10)
26
internal sealed class NamingStylePreferences : IEquatable<
NamingStylePreferences
>
300
public static
NamingStylePreferences
Default { get; } = FromXElement(XElement.Parse(DefaultNamingPreferencesString));
301
public static
NamingStylePreferences
Empty { get; } = new([], [], []);
328
internal static
NamingStylePreferences
FromXElement(XElement element)
342
=> Equals(obj as
NamingStylePreferences
);
344
public bool Equals(
NamingStylePreferences
other)
354
public static bool operator ==(
NamingStylePreferences
left,
NamingStylePreferences
right)
368
public static bool operator !=(
NamingStylePreferences
left,
NamingStylePreferences
right)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\NamingStylePreferencesEditorConfigSerializer.cs (1)
19
public static void AppendToEditorConfig(this
NamingStylePreferences
namingStylePreferences, string language, StringBuilder editorconfig)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SerializableNamingRule.cs (1)
24
public NamingRule GetRule(
NamingStylePreferences
info)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\OptionDefinition.cs (1)
104
type == typeof(
NamingStylePreferences
) ||
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\NamingStyles\NamingStylePreferencesProviders.cs (1)
15
public static async ValueTask<
NamingStylePreferences
> GetNamingStylePreferencesAsync(this Document document, CancellationToken cancellationToken)
Workspace\Solution\ProjectState.cs (2)
580
public override
NamingStylePreferences
GetNamingStylePreferences()
581
=>
NamingStylePreferences
.Empty;
Microsoft.CodeAnalysis.Workspaces.UnitTests (3)
CodeStyle\NamingStylePreferencesUpgradeTests.cs (1)
21
var
preferences = NamingStylePreferences.FromXElement(XElement.Parse(serializedPreferences));
EditorConfigStorageLocation\NamingStylePreferenceEditorConfigStorageLocationTests.cs (2)
18
var
value = options.GetNamingStylePreferences();
35
var
value = options.GetNamingStylePreferences();