58 instantiations of OptionKey
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (5)
Microsoft.CodeAnalysis.Workspaces (8)
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (2)
Microsoft.CodeAnalysis.Workspaces.UnitTests (43)
Formatter\FormatterTests.cs (8)
73WithChangedOption(new OptionKey(FormattingOptions.UseTabs, NoCompilationConstants.LanguageName), false).
74WithChangedOption(new OptionKey(FormattingOptions.TabSize, NoCompilationConstants.LanguageName), 1).
75WithChangedOption(new OptionKey(FormattingOptions.IndentationSize, NoCompilationConstants.LanguageName), 7).
76WithChangedOption(new OptionKey(FormattingOptions.NewLine, NoCompilationConstants.LanguageName), "\n");
86Add(new OptionKey(FormattingOptions.UseTabs, NoCompilationConstants.LanguageName), true).
87Add(new OptionKey(FormattingOptions.TabSize, NoCompilationConstants.LanguageName), 5).
88Add(new OptionKey(FormattingOptions.IndentationSize, NoCompilationConstants.LanguageName), 6).
89Add(new OptionKey(FormattingOptions.NewLine, NoCompilationConstants.LanguageName), "\r")) : null;
Options\DocumentOptionSetTests.cs (21)
22new OptionKey(CodeStyleOptions2.PreferIntrinsicPredefinedTypeKeywordInMemberAccess, LanguageNames.CSharp),
52new OptionKey(CodeStyleOptions2.PreferIntrinsicPredefinedTypeKeywordInMemberAccess, LanguageNames.CSharp),
77var optionKey = new OptionKey(CodeStyleOptions.PreferIntrinsicPredefinedTypeKeywordInMemberAccess, LanguageNames.CSharp);
109var optionKey = new OptionKey(legacyOption);
114Assert.Equal(newInternalValue, updatedSet.GetInternalOptionValue(new OptionKey(option)));
123.Add(new OptionKey(CSharpFormattingOptions.NewLinesForBracesInTypes), false)
124.Add(new OptionKey(CSharpFormattingOptions.NewLinesForBracesInAccessors), true)
125.Add(new OptionKey(CSharpFormattingOptions.NewLinesForBracesInAnonymousMethods), false));
134Assert.True((bool?)set.GetOption(new OptionKey(CSharpFormattingOptions.NewLinesForBracesInTypes)));
135Assert.True((bool?)set.GetOption(new OptionKey(CSharpFormattingOptions.NewLinesForBracesInMethods)));
136Assert.False((bool?)set.GetOption(new OptionKey(CSharpFormattingOptions.NewLinesForBracesInAccessors)));
137Assert.False((bool?)set.GetOption(new OptionKey(CSharpFormattingOptions.NewLinesForBracesInAnonymousMethods)));
138Assert.False((bool?)set.GetOption(new OptionKey(CSharpFormattingOptions.NewLinesForBracesInProperties)));
140var updatedSet = set.WithChangedOption(new OptionKey(CSharpFormattingOptions.NewLinesForBracesInProperties), true);
142Assert.True((bool?)updatedSet.GetOption(new OptionKey(CSharpFormattingOptions.NewLinesForBracesInTypes)));
143Assert.True((bool?)updatedSet.GetOption(new OptionKey(CSharpFormattingOptions.NewLinesForBracesInMethods)));
144Assert.False((bool?)updatedSet.GetOption(new OptionKey(CSharpFormattingOptions.NewLinesForBracesInAccessors)));
145Assert.False((bool?)updatedSet.GetOption(new OptionKey(CSharpFormattingOptions.NewLinesForBracesInAnonymousMethods)));
146Assert.True((bool?)updatedSet.GetOption(new OptionKey(CSharpFormattingOptions.NewLinesForBracesInProperties)));
165var optionKey = new OptionKey(legacyOption);
170Assert.Equal(newInternalValue, updatedSet.GetInternalOptionValue(new OptionKey(option)));
67 references to OptionKey
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (3)
Microsoft.CodeAnalysis.ExternalAccess.Razor.Features (1)
Microsoft.CodeAnalysis.Features (1)
Microsoft.CodeAnalysis.Workspaces (30)
Options\DocumentOptionSet.cs (6)
27private ImmutableDictionary<OptionKey, object?> _values;
30: this(configOptions, underlyingOptions, language, ImmutableDictionary<OptionKey, object?>.Empty)
34private DocumentOptionSet(StructuredAnalyzerConfigOptions? configOptions, OptionSet underlyingOptions, string language, ImmutableDictionary<OptionKey, object?> values)
45internal override object? GetInternalOptionValue(OptionKey optionKey)
63private bool TryGetAnalyzerConfigOption(OptionKey optionKey, out object? value)
93internal override OptionSet WithChangedOptionInternal(OptionKey optionKey, object? internalValue)
Options\SolutionOptionSet.cs (8)
24private ImmutableDictionary<OptionKey, object?> _values;
29private readonly ImmutableHashSet<OptionKey> _changedOptionKeys;
33ImmutableDictionary<OptionKey, object?> values,
34ImmutableHashSet<OptionKey> changedOptionKeys)
42: this(globalOptions, values: ImmutableDictionary<OptionKey, object?>.Empty, changedOptionKeys: [])
47internal override object? GetInternalOptionValue(OptionKey optionKey)
61internal override OptionSet WithChangedOptionInternal(OptionKey optionKey, object? internalValue)
79internal (ImmutableArray<KeyValuePair<OptionKey2, object?>> internallyDefined, ImmutableArray<KeyValuePair<OptionKey, object?>> externallyDefined) GetChangedOptions()
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (5)
Microsoft.CodeAnalysis.Workspaces.UnitTests (27)