47 references to NamingPreferences
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (4)
ConvertAutoPropertyToFullProperty\ConvertAutoPropertyToFullPropertyTests_OptionSets.cs (3)
57{ NamingStyleOptions.NamingPreferences, CreateCustomFieldNamingStylePreference() }, 64{ NamingStyleOptions.NamingPreferences, CreateUnderscorePrefixedFieldNamingStylePreference() }, 71{ NamingStyleOptions.NamingPreferences, CreateCustomStaticFieldNamingStylePreference() },
ConvertTupleToStruct\ConvertTupleToStructTests.cs (1)
410options.Add(NamingStyleOptions.NamingPreferences, info);
Microsoft.CodeAnalysis.EditorFeatures (3)
EditorConfigSettings\DataProvider\NamingStyles\NamingStyleSettingsProvider.cs (1)
29options.GetInitialLocationAndValue<NamingStylePreferences>(NamingStyleOptions.NamingPreferences, out var location, out var namingPreferences);
EditorConfigSettings\Updater\NamingStyles\SourceTextExtensions.cs (2)
83var csharpNamingStylePreferences = globalOptions.GetOption(NamingStyleOptions.NamingPreferences, LanguageNames.CSharp); 84var vbNamingStylePreferences = globalOptions.GetOption(NamingStyleOptions.NamingPreferences, LanguageNames.VisualBasic);
Microsoft.CodeAnalysis.EditorFeatures.DiagnosticsTests.Utilities (24)
NamingStyles\NamingStylesTestOptionSets.cs (24)
28_optionKey = new OptionKey2(NamingStyleOptions.NamingPreferences, languageName); 37return new OptionsCollection(_languageName) { { NamingStyleOptions.NamingPreferences, new NamingStylePreferences( 44=> new OptionsCollection(_languageName) { { NamingStyleOptions.NamingPreferences, ClassNamesArePascalCaseOption() } }; 47=> new OptionsCollection(_languageName) { { NamingStyleOptions.NamingPreferences, FieldNamesAreCamelCaseOption() } }; 50=> new OptionsCollection(_languageName) { { NamingStyleOptions.NamingPreferences, FieldNamesAreCamelCaseWithUnderscorePrefixOption() } }; 53=> new OptionsCollection(_languageName) { { NamingStyleOptions.NamingPreferences, FieldNamesAreCamelCaseWithFieldUnderscorePrefixOption() } }; 56=> new OptionsCollection(_languageName) { { NamingStyleOptions.NamingPreferences, FieldNamesAreCamelCaseWithFieldUnderscorePrefixAndUnderscoreEndSuffixOption() } }; 59=> new OptionsCollection(_languageName) { { NamingStyleOptions.NamingPreferences, MethodNamesArePascalCaseOption() } }; 62=> new OptionsCollection(_languageName) { { NamingStyleOptions.NamingPreferences, MethodNamesAreCamelCaseOption() } }; 65=> new OptionsCollection(_languageName) { { NamingStyleOptions.NamingPreferences, ParameterNamesAreCamelCaseOption() } }; 68=> new OptionsCollection(_languageName) { { NamingStyleOptions.NamingPreferences, ParameterNamesAreCamelCaseWithPUnderscorePrefixOption() } }; 71=> new OptionsCollection(_languageName) { { NamingStyleOptions.NamingPreferences, ParameterNamesAreCamelCaseWithPUnderscorePrefixAndUnderscoreEndSuffixOption() } }; 74=> new OptionsCollection(_languageName) { { NamingStyleOptions.NamingPreferences, LocalNamesAreCamelCaseOption() } }; 77=> new OptionsCollection(_languageName) { { NamingStyleOptions.NamingPreferences, LocalFunctionNamesAreCamelCaseOption() } }; 80=> new OptionsCollection(_languageName) { { NamingStyleOptions.NamingPreferences, PropertyNamesArePascalCaseOption() } }; 83=> new OptionsCollection(_languageName) { { NamingStyleOptions.NamingPreferences, InterfaceNamesStartWithIOption() } }; 86=> new OptionsCollection(_languageName) { { NamingStyleOptions.NamingPreferences, TypeParameterNamesStartWithTOption() } }; 89=> new OptionsCollection(_languageName) { { NamingStyleOptions.NamingPreferences, ConstantsAreUpperCaseOption() } }; 92=> new OptionsCollection(_languageName) { { NamingStyleOptions.NamingPreferences, LocalsAreCamelCaseConstantsAreUpperCaseOption() } }; 95=> new OptionsCollection(_languageName) { { NamingStyleOptions.NamingPreferences, AsyncFunctionNamesEndWithAsyncOption() } }; 98=> new OptionsCollection(_languageName) { { NamingStyleOptions.NamingPreferences, MethodNamesArePascalCaseOption(accessibilities) } }; 101=> new OptionsCollection(_languageName) { { NamingStyleOptions.NamingPreferences, SymbolKindsArePascalCaseOption(symbolKinds) } }; 104=> new OptionsCollection(_languageName) { { NamingStyleOptions.NamingPreferences, SymbolKindsArePascalCaseOption(ImmutableArray<SymbolSpecification.SymbolKindOrTypeKind>.Empty) } }; 128=> new OptionsCollection(_languageName) { { NamingStyleOptions.NamingPreferences, AccessibilitiesArePascalCaseOption(accessibilities) } };
Microsoft.CodeAnalysis.Features (2)
AnalyzerOptionsProvider.cs (1)
67public NamingStylePreferences NamingPreferences => GetOption(NamingStyleOptions.NamingPreferences, _fallbackOptions.GenerationOptions?.NamingStyle ?? NamingStylePreferences.Default);
NamingStyleDiagnosticAnalyzerBase.cs (1)
165builder["OptionName"] = nameof(NamingStyleOptions.NamingPreferences);
Microsoft.CodeAnalysis.LanguageServer.Protocol (2)
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer.cs (1)
73if (e.Option == NamingStyleOptions.NamingPreferences ||
Features\Options\NamingStyleOptionsStorage.cs (1)
13=> globalOptions.GetOption(NamingStyleOptions.NamingPreferences, language);
Microsoft.CodeAnalysis.Workspaces (5)
CodeGenerationOptions.cs (1)
39NamingStyle = options.GetOption(NamingStyleOptions.NamingPreferences, language, fallbackOptions.NamingStyle);
NamingStyleOptions.cs (2)
43return configOptions.GetEditorConfigOption(NamingStyleOptions.NamingPreferences, fallbackOptions ?? NamingStylePreferences.Default); 49if (configOptions.TryGetEditorConfigOption<NamingStylePreferences>(NamingStyleOptions.NamingPreferences, out var value))
Options\EditorConfig\EditorConfigFileGenerator.cs (1)
47if (configOptions.TryGetOption(new OptionKey2(NamingStyleOptions.NamingPreferences, language), out NamingStylePreferences namingStylePreferences))
Options\LegacyGlobalCodeActionOptionsWorkspaceService.cs (1)
72=> ValueTaskFactory.FromResult(_options.GetOption(NamingStyleOptions.NamingPreferences, languageServices.Language));
Microsoft.CodeAnalysis.Workspaces.UnitTests (1)
Options\OptionKeyTests.cs (1)
187Assert.True(NamingStyleOptions.NamingPreferences.Definition.IsEditorConfigOption);
Microsoft.VisualStudio.LanguageServices (2)
Options\NamingPreferencesReadFallback.cs (1)
27return readValue($"TextEditor.{language}.Specific.NamingPreferences", typeof(NamingStylePreferences), NamingStyleOptions.NamingPreferences.DefaultValue);
PreviewPane\PreviewPaneService.cs (1)
118if (optionName == nameof(NamingStyleOptions.NamingPreferences))
Microsoft.VisualStudio.LanguageServices.CSharp (2)
Options\AutomationObject\AutomationObject.Naming.cs (2)
16get { return GetOption(NamingStyleOptions.NamingPreferences).CreateXElement().ToString(); } 21SetOption(NamingStyleOptions.NamingPreferences, NamingStylePreferences.FromXElement(XElement.Parse(value)));
Microsoft.VisualStudio.LanguageServices.Implementation (2)
Options\Style\NamingPreferences\NamingStyleOptionPageControl.xaml.cs (2)
178OptionStore.SetOption(NamingStyleOptions.NamingPreferences, _languageName, info); 185var preferences = OptionStore.GetOption<NamingStylePreferences>(NamingStyleOptions.NamingPreferences, _languageName);