65 instantiations of OptionKey
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (5)
Microsoft.CodeAnalysis.Workspaces (8)
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (2)
Microsoft.CodeAnalysis.Workspaces.UnitTests (50)
Formatter\FormatterTests.cs (8)
74WithChangedOption(new OptionKey(FormattingOptions.UseTabs, NoCompilationConstants.LanguageName), false).
75WithChangedOption(new OptionKey(FormattingOptions.TabSize, NoCompilationConstants.LanguageName), 1).
76WithChangedOption(new OptionKey(FormattingOptions.IndentationSize, NoCompilationConstants.LanguageName), 7).
77WithChangedOption(new OptionKey(FormattingOptions.NewLine, NoCompilationConstants.LanguageName), "\n");
87Add(new OptionKey(FormattingOptions.UseTabs, NoCompilationConstants.LanguageName), true).
88Add(new OptionKey(FormattingOptions.TabSize, NoCompilationConstants.LanguageName), 5).
89Add(new OptionKey(FormattingOptions.IndentationSize, NoCompilationConstants.LanguageName), 6).
90Add(new OptionKey(FormattingOptions.NewLine, NoCompilationConstants.LanguageName), "\r")) : null;
Options\DocumentOptionSetTests.cs (21)
24new 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));
133Assert.True((bool?)set.GetOption(new OptionKey(CSharpFormattingOptions.NewLinesForBracesInTypes)));
134Assert.True((bool?)set.GetOption(new OptionKey(CSharpFormattingOptions.NewLinesForBracesInMethods)));
135Assert.False((bool?)set.GetOption(new OptionKey(CSharpFormattingOptions.NewLinesForBracesInAccessors)));
136Assert.False((bool?)set.GetOption(new OptionKey(CSharpFormattingOptions.NewLinesForBracesInAnonymousMethods)));
137Assert.False((bool?)set.GetOption(new OptionKey(CSharpFormattingOptions.NewLinesForBracesInProperties)));
139var updatedSet = set.WithChangedOption(new OptionKey(CSharpFormattingOptions.NewLinesForBracesInProperties), true);
141Assert.True((bool?)updatedSet.GetOption(new OptionKey(CSharpFormattingOptions.NewLinesForBracesInTypes)));
142Assert.True((bool?)updatedSet.GetOption(new OptionKey(CSharpFormattingOptions.NewLinesForBracesInMethods)));
143Assert.False((bool?)updatedSet.GetOption(new OptionKey(CSharpFormattingOptions.NewLinesForBracesInAccessors)));
144Assert.False((bool?)updatedSet.GetOption(new OptionKey(CSharpFormattingOptions.NewLinesForBracesInAnonymousMethods)));
145Assert.True((bool?)updatedSet.GetOption(new OptionKey(CSharpFormattingOptions.NewLinesForBracesInProperties)));
164var optionKey = new OptionKey(legacyOption);
169Assert.Equal(newInternalValue, updatedSet.GetInternalOptionValue(new OptionKey(option)));
76 references to OptionKey
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (3)
Microsoft.CodeAnalysis.ExternalAccess.Razor (1)
Microsoft.CodeAnalysis.Features (1)
Microsoft.CodeAnalysis.Workspaces (37)
Options\DocumentOptionSet.cs (6)
34private ImmutableDictionary<OptionKey, object?> _values;
37: this(configOptions, underlyingOptions, language, ImmutableDictionary<OptionKey, object?>.Empty)
41private DocumentOptionSet(StructuredAnalyzerConfigOptions? configOptions, OptionSet underlyingOptions, string language, ImmutableDictionary<OptionKey, object?> values)
52internal override object? GetInternalOptionValue(OptionKey optionKey)
70private bool TryGetAnalyzerConfigOption(OptionKey optionKey, out object? value)
100internal override OptionSet WithChangedOptionInternal(OptionKey optionKey, object? internalValue)
Options\SolutionOptionSet.cs (9)
25private ImmutableDictionary<OptionKey, object?> _values;
30private readonly ImmutableHashSet<OptionKey> _changedOptionKeys;
34ImmutableDictionary<OptionKey, object?> values,
35ImmutableHashSet<OptionKey> changedOptionKeys)
43: this(globalOptions, values: ImmutableDictionary<OptionKey, object?>.Empty, changedOptionKeys: ImmutableHashSet<OptionKey>.Empty)
48internal override object? GetInternalOptionValue(OptionKey optionKey)
62internal override OptionSet WithChangedOptionInternal(OptionKey optionKey, object? internalValue)
80internal (ImmutableArray<KeyValuePair<OptionKey2, object?>> internallyDefined, ImmutableArray<KeyValuePair<OptionKey, object?>> externallyDefined) GetChangedOptions()
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (5)
Microsoft.CodeAnalysis.Workspaces.UnitTests (29)