1 instantiation of NamingStylePreferences
Microsoft.CodeAnalysis.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (1)
78
return new
NamingStylePreferences
(
54 references to NamingStylePreferences
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (2)
Options\SolutionAnalyzerConfigOptionsUpdaterTests.cs (2)
113
var
initialPeferences = OptionsTestHelpers.CreateNamingStylePreferences(
158
var
hostPeferences = OptionsTestHelpers.CreateNamingStylePreferences(
Microsoft.CodeAnalysis.Workspaces (31)
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 (1)
17
public static
NamingStylePreferences
ParseDictionary(AnalyzerConfigOptions allRawConventions)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyleOptions.cs (4)
23
internal static PerLanguageOption2<
NamingStylePreferences
> NamingPreferences { get; } = new(
25
defaultValue:
NamingStylePreferences
.Default,
27
serializer: EditorConfigValueSerializer<
NamingStylePreferences
>.Unsupported);
37
: OptionsProvider<
NamingStylePreferences
>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\NamingStylePreferences.cs (10)
23
internal sealed class NamingStylePreferences : IEquatable<
NamingStylePreferences
>
338
public static
NamingStylePreferences
Default { get; } = FromXElement(XElement.Parse(DefaultNamingPreferencesString));
339
public static
NamingStylePreferences
Empty { get; } = new([], [], ImmutableArray<NamingRule>.Empty);
355
internal static
NamingStylePreferences
FromXElement(XElement element)
366
=> Equals(obj as
NamingStylePreferences
);
368
public bool Equals(
NamingStylePreferences
? other)
378
public static bool operator ==(
NamingStylePreferences
? left,
NamingStylePreferences
? right)
392
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\Options\EditorConfigValueSerializer.cs (1)
181
if (value is
NamingStylePreferences
preferences)
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 (21)
EditorConfigStorageLocation\NamingStylePreferenceEditorConfigStorageLocationTests.cs (2)
18
var
value = options.GetNamingStylePreferences();
35
var
value = options.GetNamingStylePreferences();
Options\EditorConfigNamingStyleParserTests.cs (18)
31
var
result = OptionsTestHelpers.ParseNamingStylePreferences(dictionary);
79
var
result = OptionsTestHelpers.ParseNamingStylePreferences(dictionary);
101
var
result = OptionsTestHelpers.ParseNamingStylePreferences(dictionary);
143
var
result = OptionsTestHelpers.ParseNamingStylePreferences(dictionary);
159
var
result = OptionsTestHelpers.ParseNamingStylePreferences(dictionary);
207
var
result = OptionsTestHelpers.ParseNamingStylePreferences(dictionary);
249
var
result = OptionsTestHelpers.ParseNamingStylePreferences(dictionary);
292
var
result = OptionsTestHelpers.ParseNamingStylePreferences(dictionary);
328
var
result = OptionsTestHelpers.ParseNamingStylePreferences(dictionary);
361
var
result = OptionsTestHelpers.ParseNamingStylePreferences(rule);
391
var
result = OptionsTestHelpers.ParseNamingStylePreferences(rule);
415
var
csharpResult = OptionsTestHelpers.ParseNamingStylePreferences(charpRule);
416
var
vbResult = OptionsTestHelpers.ParseNamingStylePreferences(vbRule);
438
var
result = OptionsTestHelpers.ParseNamingStylePreferences(rule);
484
var
namingStylePreferences = OptionsTestHelpers.ParseNamingStylePreferences(new Dictionary<string, string>()
520
var
namingStylePreferences = OptionsTestHelpers.ParseNamingStylePreferences(new Dictionary<string, string>()
556
var
namingStylePreferences = OptionsTestHelpers.ParseNamingStylePreferences(new Dictionary<string, string>()
598
var
result = OptionsTestHelpers.ParseNamingStylePreferences(dictionary);
Options\NamingStylePreferencesTests.cs (1)
21
var
preferences = NamingStylePreferences.FromXElement(XElement.Parse(serializedPreferences));