3 instantiations of NamingStylePreferences
Microsoft.CodeAnalysis.Workspaces (3)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (1)
78
return new
NamingStylePreferences
(
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\NamingStylePreferences.cs (2)
336
public static NamingStylePreferences Empty { get; } =
new
([], [], ImmutableArray<NamingRule>.Empty);
354
return new
NamingStylePreferences
(
38 references to NamingStylePreferences
Microsoft.CodeAnalysis.CSharp.Features (2)
Completion\CompletionProviders\DeclarationName\DeclarationNameRecommender.cs (2)
56
var
namingStyleOptions = await document.GetNamingStylePreferencesAsync(cancellationToken).ConfigureAwait(false);
230
NamingStylePreferences
namingStyleOptions,
Microsoft.CodeAnalysis.Features (5)
Options\EditorConfig\EditorConfigFileGenerator.cs (1)
49
if (configOptions.TryGetOption(new OptionKey2(NamingStyleOptions.NamingPreferences, language), out
NamingStylePreferences
namingStylePreferences))
Snippets\SnippetProviders\AbstractTypeSnippetProvider.cs (1)
81
var
namingStylePreferences = await document.GetNamingStylePreferencesAsync(cancellationToken).ConfigureAwait(false);
src\roslyn\src\Analyzers\Core\Analyzers\AnalyzerOptionsProvider.cs (1)
38
public
NamingStylePreferences
NamingPreferences => GetOption(NamingStyleOptions.NamingPreferences);
src\roslyn\src\Analyzers\Core\Analyzers\NamingStyle\NamingStyleDiagnosticAnalyzerBase.cs (1)
136
var
namingPreferences = options.GetAnalyzerOptions(sourceTree).NamingPreferences;
src\roslyn\src\Analyzers\Core\CodeFixes\Naming\NamingExtensions.cs (1)
37
var
options = await document.GetNamingStylePreferencesAsync(cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.Workspaces (31)
Options\DocumentOptionSet.cs (1)
78
Contract.ThrowIfTrue(internallyDefinedOption.Type == typeof(
NamingStylePreferences
));
src\a1065d420d446521\NamingStylePreferencesEditorConfigSerializer.cs (1)
19
public static void AppendToEditorConfig(this
NamingStylePreferences
namingStylePreferences, string language, StringBuilder editorconfig)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeGeneration\CodeGenerationOptions.cs (2)
22
[DataMember] public
NamingStylePreferences
NamingStyle { get; init; } =
NamingStylePreferences
.Default;
src\roslyn\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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\AnalyzerConfigOptionsExtensions.cs (2)
25
if (option.Definition.Type == typeof(
NamingStylePreferences
))
29
var
preferences = structuredOptions.GetNamingStylePreferences();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (1)
17
public static
NamingStylePreferences
ParseDictionary(AnalyzerConfigOptions allRawConventions)
src\roslyn\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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\NamingStylePreferences.cs (10)
23
internal sealed class NamingStylePreferences : IEquatable<
NamingStylePreferences
>
335
public static
NamingStylePreferences
Default { get; } = FromXElement(XElement.Parse(DefaultNamingPreferencesString));
336
public static
NamingStylePreferences
Empty { get; } = new([], [], ImmutableArray<NamingRule>.Empty);
350
internal static
NamingStylePreferences
FromXElement(XElement element)
361
=> Equals(obj as
NamingStylePreferences
);
363
public bool Equals(
NamingStylePreferences
? other)
373
public static bool operator ==(
NamingStylePreferences
? left,
NamingStylePreferences
? right)
387
public static bool operator !=(
NamingStylePreferences
left,
NamingStylePreferences
right)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\EditorConfigValueSerializer.cs (1)
182
if (value is
NamingStylePreferences
preferences)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\OptionDefinition.cs (1)
103
type == typeof(
NamingStylePreferences
) ||
src\roslyn\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)
553
public override
NamingStylePreferences
GetNamingStylePreferences()
554
=>
NamingStylePreferences
.Empty;