3 types derived from Setting
Microsoft.CodeAnalysis.EditorFeatures (3)
EditorConfigSettings\Data\CodeStyleSetting.cs (1)
12internal abstract class CodeStyleSetting(OptionKey2 optionKey, string description, OptionUpdater updater, SettingLocation location) : Setting(optionKey, description, updater, location)
EditorConfigSettings\Data\EnumFlagsSetting.cs (1)
19Conversions<TOptionValue, int> conversions) : Setting(optionKey, description, updater, location)
EditorConfigSettings\Data\Setting`1.cs (1)
16TOptionValue initialValue) : Setting(optionKey, description, updater, location)
109 references to Setting
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (1)
EditorConfigSettings\Updater\SettingsUpdaterTests.cs (1)
373var setting = Setting.Create(CSharpFormattingOptions2.NewLineForElse, "description", options, updater);
Microsoft.CodeAnalysis.EditorFeatures (3)
EditorConfigSettings\Aggregator\SettingsAggregator.cs (3)
26private ISettingsProviderFactory<Setting> _whitespaceProvider; 76if (typeof(TData) == typeof(Setting)) 105_whitespaceProvider = GetOptionsProviderFactory<Setting>(solution);
Microsoft.VisualStudio.LanguageServices (37)
EditorConfigSettings\Common\IEnumSettingViewModelFactory.cs (1)
13IEnumSettingViewModel CreateViewModel(Setting setting);
EditorConfigSettings\DataProvider\Whitespace\CommonWhitespaceSettingsProvider.cs (8)
16internal sealed class CommonWhitespaceSettingsProvider : SettingsProviderBase<Setting, OptionUpdater, IOption2, object> 30private static IEnumerable<Setting> GetDefaultOptions(TieredAnalyzerConfigOptions options, OptionUpdater updater) 32yield return Setting.Create(FormattingOptions2.UseTabs, EditorFeaturesResources.Use_Tabs, options, updater); 33yield return Setting.Create(FormattingOptions2.TabSize, EditorFeaturesResources.Tab_Size, options, updater); 34yield return Setting.Create(FormattingOptions2.IndentationSize, EditorFeaturesResources.Indentation_Size, options, updater); 35yield return Setting.Create(FormattingOptions2.NewLine, EditorFeaturesResources.New_Line, options, updater); 36yield return Setting.Create(FormattingOptions2.InsertFinalNewLine, EditorFeaturesResources.Insert_Final_Newline, options, updater); 37yield return Setting.Create(CodeStyleOptions2.OperatorPlacementWhenWrapping, ServicesVSResources.Operator_placement_when_wrapping, options, updater);
EditorConfigSettings\DataProvider\Whitespace\CommonWhitespaceSettingsProviderFactory.cs (2)
11internal sealed class CommonWhitespaceSettingsProviderFactory : IWorkspaceSettingsProviderFactory<Setting> 22public ISettingsProvider<Setting> GetForFile(string filePath)
EditorConfigSettings\DataProvider\Whitespace\CommonWhitespaceSettingsWorkspaceServiceFactory.cs (1)
14[ExportWorkspaceServiceFactory(typeof(IWorkspaceSettingsProviderFactory<Setting>)), Shared]
EditorConfigSettings\SettingsEditorPane.cs (1)
130return GetView<Setting>(
EditorConfigSettings\Whitespace\View\ColumnDefnitions\WhitespaceValueColumnDefinition.cs (1)
43if (!entry.TryGetValue(Value, out Setting setting))
EditorConfigSettings\Whitespace\ViewModel\IndentationSizeViewModel.cs (3)
30public IEnumSettingViewModel CreateViewModel(Setting setting) 52private readonly Setting _setting; 54public IndentationSizeViewModel(Setting setting)
EditorConfigSettings\Whitespace\ViewModel\NewLineViewModel.cs (3)
30public IEnumSettingViewModel CreateViewModel(Setting setting) 48private readonly Setting _setting; 50public NewLineViewModel(Setting setting)
EditorConfigSettings\Whitespace\ViewModel\OperatorPlacementWhenWrappingViewModel.cs (3)
29public IEnumSettingViewModel CreateViewModel(Setting setting) 38private readonly Setting _setting; 40public OperatorPlacementWhenWrappingViewModel(Setting setting)
EditorConfigSettings\Whitespace\ViewModel\TabSizeViewModel.cs (2)
14private readonly Setting _setting; 16public TabSizeViewModel(Setting setting)
EditorConfigSettings\Whitespace\ViewModel\TabSizeViewModelFactory.cs (1)
28public IEnumSettingViewModel CreateViewModel(Setting setting)
EditorConfigSettings\Whitespace\ViewModel\WhitespaceSettingBoolViewModel.cs (2)
11private readonly Setting _setting; 31public WhitespaceSettingBoolViewModel(Setting setting)
EditorConfigSettings\Whitespace\ViewModel\WhitespaceViewModel.cs (3)
16Setting, 20public WhitespaceViewModel(ISettingsProvider<Setting> data, 28protected override SettingsSnapshotFactory CreateSnapshotFactory(ISettingsProvider<Setting> data)
EditorConfigSettings\Whitespace\ViewModel\WhitespaceViewModel.SettingsEntriesSnapshot.cs (3)
14internal sealed class SettingsEntriesSnapshot : SettingsEntriesSnapshotBase<Setting> 16public SettingsEntriesSnapshot(ImmutableArray<Setting> data, int currentVersionNumber) : base(data, currentVersionNumber) { } 18protected override bool TryGetValue(Setting result, string keyName, out object? content)
EditorConfigSettings\Whitespace\ViewModel\WhitespaceViewModel.SettingsSnapshotFactory.cs (3)
14internal sealed class SettingsSnapshotFactory : SettingsSnapshotFactoryBase<Setting, SettingsEntriesSnapshot> 16public SettingsSnapshotFactory(ISettingsProvider<Setting> data) : base(data) { } 18protected override SettingsEntriesSnapshot CreateSnapshot(ImmutableArray<Setting> data, int currentVersionNumber)
Microsoft.VisualStudio.LanguageServices.CSharp (61)
EditorConfigSettings\BinaryOperatorSpacingOptionsViewModel.cs (2)
15private readonly Setting _setting; 17public BinaryOperatorSpacingOptionsViewModel(Setting setting)
EditorConfigSettings\BinaryOperatorSpacingOptionsViewModelFactory.cs (1)
24public IEnumSettingViewModel CreateViewModel(Setting setting)
EditorConfigSettings\DataProvider\Whitespace\CSharpWhitespaceSettingsLanguageServiceFactory.cs (1)
16[ExportLanguageServiceFactory(typeof(ILanguageSettingsProviderFactory<Setting>), LanguageNames.CSharp), Shared]
EditorConfigSettings\DataProvider\Whitespace\CSharpWhitespaceSettingsProvider.cs (52)
17internal sealed class CSharpWhitespaceSettingsProvider : SettingsProviderBase<Setting, OptionUpdater, IOption2, object> 40private static IEnumerable<Setting> GetSpacingOptions(TieredAnalyzerConfigOptions options, OptionUpdater updaterService) 42yield return Setting.Create(CSharpFormattingOptions2.SpacingAfterMethodDeclarationName, CSharpVSResources.Insert_space_between_method_name_and_its_opening_parenthesis, options, updaterService); 43yield return Setting.Create(CSharpFormattingOptions2.SpaceWithinMethodDeclarationParenthesis, CSharpVSResources.Insert_space_within_parameter_list_parentheses, options, updaterService); 44yield return Setting.Create(CSharpFormattingOptions2.SpaceBetweenEmptyMethodDeclarationParentheses, CSharpVSResources.Insert_space_within_empty_parameter_list_parentheses, options, updaterService); 45yield return Setting.Create(CSharpFormattingOptions2.SpaceAfterMethodCallName, CSharpVSResources.Insert_space_between_called_method_name_and_its_opening_parenthesis, options, updaterService); 46yield return Setting.Create(CSharpFormattingOptions2.SpaceWithinMethodCallParentheses, CSharpVSResources.Insert_space_within_argument_list_parentheses, options, updaterService); 47yield return Setting.Create(CSharpFormattingOptions2.SpaceBetweenEmptyMethodCallParentheses, CSharpVSResources.Insert_space_within_empty_argument_list_parentheses, options, updaterService); 49yield return Setting.Create(CSharpFormattingOptions2.SpaceAfterControlFlowStatementKeyword, CSharpVSResources.Insert_space_after_keywords_in_control_flow_statements, options, updaterService); 52yield return Setting.CreateEnumFlags(CSharpFormattingOptions2.SpaceBetweenParentheses, (int)SpacePlacementWithinParentheses.Expressions, CSharpVSResources.Insert_space_within_parentheses_of_expressions, spaceBetweenParenthesesValue, s_spaceBetweenParenthesesConversions, options, updaterService); 53yield return Setting.CreateEnumFlags(CSharpFormattingOptions2.SpaceBetweenParentheses, (int)SpacePlacementWithinParentheses.TypeCasts, CSharpVSResources.Insert_space_within_parentheses_of_type_casts, spaceBetweenParenthesesValue, s_spaceBetweenParenthesesConversions, options, updaterService); 54yield return Setting.CreateEnumFlags(CSharpFormattingOptions2.SpaceBetweenParentheses, (int)SpacePlacementWithinParentheses.ControlFlowStatements, CSharpVSResources.Insert_spaces_within_parentheses_of_control_flow_statements, spaceBetweenParenthesesValue, s_spaceBetweenParenthesesConversions, options, updaterService); 56yield return Setting.Create(CSharpFormattingOptions2.SpaceAfterCast, CSharpVSResources.Insert_space_after_cast, options, updaterService); 57yield return Setting.Create(CSharpFormattingOptions2.SpacesIgnoreAroundVariableDeclaration, CSharpVSResources.Ignore_spaces_in_declaration_statements, options, updaterService); 59yield return Setting.Create(CSharpFormattingOptions2.SpaceBeforeOpenSquareBracket, CSharpVSResources.Insert_space_before_open_square_bracket, options, updaterService); 60yield return Setting.Create(CSharpFormattingOptions2.SpaceBetweenEmptySquareBrackets, CSharpVSResources.Insert_space_within_empty_square_brackets, options, updaterService); 61yield return Setting.Create(CSharpFormattingOptions2.SpaceWithinSquareBrackets, CSharpVSResources.Insert_spaces_within_square_brackets, options, updaterService); 63yield return Setting.Create(CSharpFormattingOptions2.SpaceAfterColonInBaseTypeDeclaration, CSharpVSResources.Insert_space_after_colon_for_base_or_interface_in_type_declaration, options, updaterService); 64yield return Setting.Create(CSharpFormattingOptions2.SpaceAfterComma, CSharpVSResources.Insert_space_after_comma, options, updaterService); 65yield return Setting.Create(CSharpFormattingOptions2.SpaceAfterDot, CSharpVSResources.Insert_space_after_dot, options, updaterService); 66yield return Setting.Create(CSharpFormattingOptions2.SpaceAfterSemicolonsInForStatement, CSharpVSResources.Insert_space_after_semicolon_in_for_statement, options, updaterService); 67yield return Setting.Create(CSharpFormattingOptions2.SpaceBeforeColonInBaseTypeDeclaration, CSharpVSResources.Insert_space_before_colon_for_base_or_interface_in_type_declaration, options, updaterService); 68yield return Setting.Create(CSharpFormattingOptions2.SpaceBeforeComma, CSharpVSResources.Insert_space_before_comma, options, updaterService); 69yield return Setting.Create(CSharpFormattingOptions2.SpaceBeforeDot, CSharpVSResources.Insert_space_before_dot, options, updaterService); 70yield return Setting.Create(CSharpFormattingOptions2.SpaceBeforeSemicolonsInForStatement, CSharpVSResources.Insert_space_before_semicolon_in_for_statement, options, updaterService); 72yield return Setting.Create(CSharpFormattingOptions2.SpacingAroundBinaryOperator, CSharpVSResources.Set_spacing_for_operators, options, updaterService); 75private static IEnumerable<Setting> GetNewLineOptions(TieredAnalyzerConfigOptions options, OptionUpdater updaterService) 78yield return Setting.CreateEnumFlags(CSharpFormattingOptions2.NewLineBeforeOpenBrace, (int)NewLineBeforeOpenBracePlacement.Types, CSharpVSResources.Place_open_brace_on_new_line_for_types, newLineBeforeOpenBraceValue, s_newLinesForBracesConversions, options, updaterService); 79yield return Setting.CreateEnumFlags(CSharpFormattingOptions2.NewLineBeforeOpenBrace, (int)NewLineBeforeOpenBracePlacement.Methods, CSharpVSResources.Place_open_brace_on_new_line_for_methods_local_functions, newLineBeforeOpenBraceValue, s_newLinesForBracesConversions, options, updaterService); 80yield return Setting.CreateEnumFlags(CSharpFormattingOptions2.NewLineBeforeOpenBrace, (int)NewLineBeforeOpenBracePlacement.Properties, CSharpVSResources.Place_open_brace_on_new_line_for_properties_indexers_and_events, newLineBeforeOpenBraceValue, s_newLinesForBracesConversions, options, updaterService); 81yield return Setting.CreateEnumFlags(CSharpFormattingOptions2.NewLineBeforeOpenBrace, (int)NewLineBeforeOpenBracePlacement.Accessors, CSharpVSResources.Place_open_brace_on_new_line_for_property_indexer_and_event_accessors, newLineBeforeOpenBraceValue, s_newLinesForBracesConversions, options, updaterService); 82yield return Setting.CreateEnumFlags(CSharpFormattingOptions2.NewLineBeforeOpenBrace, (int)NewLineBeforeOpenBracePlacement.AnonymousMethods, CSharpVSResources.Place_open_brace_on_new_line_for_anonymous_methods, newLineBeforeOpenBraceValue, s_newLinesForBracesConversions, options, updaterService); 83yield return Setting.CreateEnumFlags(CSharpFormattingOptions2.NewLineBeforeOpenBrace, (int)NewLineBeforeOpenBracePlacement.ControlBlocks, CSharpVSResources.Place_open_brace_on_new_line_for_control_blocks, newLineBeforeOpenBraceValue, s_newLinesForBracesConversions, options, updaterService); 84yield return Setting.CreateEnumFlags(CSharpFormattingOptions2.NewLineBeforeOpenBrace, (int)NewLineBeforeOpenBracePlacement.AnonymousTypes, CSharpVSResources.Place_open_brace_on_new_line_for_anonymous_types, newLineBeforeOpenBraceValue, s_newLinesForBracesConversions, options, updaterService); 85yield return Setting.CreateEnumFlags(CSharpFormattingOptions2.NewLineBeforeOpenBrace, (int)NewLineBeforeOpenBracePlacement.ObjectCollectionArrayInitializers, CSharpVSResources.Place_open_brace_on_new_line_for_object_collection_array_and_with_initializers, newLineBeforeOpenBraceValue, s_newLinesForBracesConversions, options, updaterService); 86yield return Setting.CreateEnumFlags(CSharpFormattingOptions2.NewLineBeforeOpenBrace, (int)NewLineBeforeOpenBracePlacement.LambdaExpressionBody, CSharpVSResources.Place_open_brace_on_new_line_for_lambda_expression, newLineBeforeOpenBraceValue, s_newLinesForBracesConversions, options, updaterService); 88yield return Setting.Create(CSharpFormattingOptions2.NewLineForElse, CSharpVSResources.Place_else_on_new_line, options, updaterService); 89yield return Setting.Create(CSharpFormattingOptions2.NewLineForCatch, CSharpVSResources.Place_catch_on_new_line, options, updaterService); 90yield return Setting.Create(CSharpFormattingOptions2.NewLineForFinally, CSharpVSResources.Place_finally_on_new_line, options, updaterService); 91yield return Setting.Create(CSharpFormattingOptions2.NewLineForMembersInObjectInit, CSharpVSResources.Place_members_in_object_initializers_on_new_line, options, updaterService); 92yield return Setting.Create(CSharpFormattingOptions2.NewLineForMembersInAnonymousTypes, CSharpVSResources.Place_members_in_anonymous_types_on_new_line, options, updaterService); 93yield return Setting.Create(CSharpFormattingOptions2.NewLineForClausesInQuery, CSharpVSResources.Place_query_expression_clauses_on_new_line, options, updaterService); 96private static IEnumerable<Setting> GetIndentationOptions(TieredAnalyzerConfigOptions options, OptionUpdater updaterService) 98yield return Setting.Create(CSharpFormattingOptions2.IndentBlock, CSharpVSResources.Indent_block_contents, options, updaterService); 99yield return Setting.Create(CSharpFormattingOptions2.IndentBraces, CSharpVSResources.Indent_open_and_close_braces, options, updaterService); 100yield return Setting.Create(CSharpFormattingOptions2.IndentSwitchCaseSection, CSharpVSResources.Indent_case_contents, options, updaterService); 101yield return Setting.Create(CSharpFormattingOptions2.IndentSwitchCaseSectionWhenBlock, CSharpVSResources.Indent_case_contents_when_block, options, updaterService); 102yield return Setting.Create(CSharpFormattingOptions2.IndentSwitchSection, CSharpVSResources.Indent_case_labels, options, updaterService); 103yield return Setting.Create(CSharpFormattingOptions2.LabelPositioning, CSharpVSResources.Label_Indentation, options, updaterService); 106private static IEnumerable<Setting> GetWrappingOptions(TieredAnalyzerConfigOptions options, OptionUpdater updaterService) 108yield return Setting.Create(CSharpFormattingOptions2.WrappingPreserveSingleLine, CSharpVSResources.Leave_block_on_single_line, options, updaterService); 109yield return Setting.Create(CSharpFormattingOptions2.WrappingKeepStatementsOnSingleLine, CSharpVSResources.Leave_statements_and_member_declarations_on_the_same_line, options, updaterService);
EditorConfigSettings\DataProvider\Whitespace\CSharpWhitespaceSettingsProviderFactory.cs (2)
13internal sealed class CSharpWhitespaceSettingsProviderFactory : ILanguageSettingsProviderFactory<Setting> 24public ISettingsProvider<Setting> GetForFile(string filePath)
EditorConfigSettings\LabelPositionOptionsViewModel.cs (3)
26public IEnumSettingViewModel CreateViewModel(Setting setting) 37private readonly Setting _setting; 39public LabelPositionOptionsViewModel(Setting setting)
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (7)
EditorConfigSettings\Aggregator\SettingsAggregatorTests.cs (1)
53public void TestGettingWhitespaceProvider() => TestGettingProvider<Setting>();
EditorConfigSettings\DataProvider\DataProviderTests.cs (6)
83TestGettingSettingsProviderFromWorkspace<Setting>(); 84TestGettingSettingsProviderFromLanguageService<Setting>(); 181var settingsProviderFactory = GettingSettingsProviderFactoryFromWorkspace<Setting>(); 205var settingsProviderFactory = GettingSettingsProviderFactoryFromLanguageService<Setting>(LanguageNames.CSharp); 219var settingsProviderFactory = GettingSettingsProviderFactoryFromLanguageServiceWithNullProjectPath<Setting>(LanguageNames.CSharp); 230var settingsProviderFactory = GettingSettingsProviderFactoryFromWorkspaceWithNullProjectPath<Setting>();