17 instantiations of OptionKey2
Microsoft.CodeAnalysis.CodeStyle (7)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\IOptionReader.cs (6)
29
=> options.TryGetOption<T>(new
OptionKey2
(option), out var value) ? value! : option.DefaultValue;
32
=> options.TryGetOption<T>(new
OptionKey2
(option), out var value) ? value! : defaultValue;
35
=> options.TryGetOption<T>(new
OptionKey2
(option, language), out var value) ? value! : option.DefaultValue;
38
=> options.TryGetOption<T>(new
OptionKey2
(option, language), out var value) ? value! : defaultValue;
44
=> options.TryGetOption<CodeStyleOption2<T>>(new
OptionKey2
(option), out var style) ? style!.Value : defaultValue;
50
=> options.TryGetOption<CodeStyleOption2<T>>(new
OptionKey2
(option, language), out var style) ? style!.Value : defaultValue;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\Option2.cs (1)
106
=>
new
(option);
Microsoft.CodeAnalysis.CodeStyle.UnitTestUtilities (6)
src\Features\DiagnosticsTestUtilities\NamingStyles\NamingStylesTestOptionSets.cs (1)
25
OptionKey = new
OptionKey2
(NamingStyleOptions.NamingPreferences, languageName);
src\Workspaces\CoreTestUtilities\OptionsCollection.cs (5)
45
=> _options[new
OptionKey2
(option)] = value;
48
=> Add(new
OptionKey2
(option), value);
54
=> Add(new
OptionKey2
(option), new CodeStyleOption2<T>(value, notification));
57
=> Add(new
OptionKey2
(option, languageName), value);
63
=> Add(new
OptionKey2
(option, languageName), new CodeStyleOption2<T>(value, notification));
Microsoft.CodeAnalysis.CSharp.CodeStyle.UnitTests (4)
AbstractCSharpDiagnosticProviderBasedUserDiagnosticTest_OptionHelpers.cs (4)
16
=> (new
OptionKey2
(option), enabled);
19
=> (new
OptionKey2
(option, this.GetLanguage()), value);
25
=> (new
OptionKey2
(option), codeStyle);
34
=> (new
OptionKey2
(option, language), codeStyle);
18 references to OptionKey2
Microsoft.CodeAnalysis.CodeStyle (4)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Diagnostics\StructuredAnalyzerConfigOptions.cs (1)
55
public bool TryGetOption<T>(
OptionKey2
optionKey, out T value)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\IOptionReader.cs (2)
12
bool TryGetOption<T>(
OptionKey2
optionKey, out T value);
19
public bool TryGetOption<T>(
OptionKey2
optionKey, out T value)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\Option2.cs (1)
105
public static implicit operator
OptionKey2
(Option2<T> option)
Microsoft.CodeAnalysis.CodeStyle.UnitTestUtilities (7)
src\Features\DiagnosticsTestUtilities\NamingStyles\NamingStylesTestOptionSets.cs (1)
28
public
OptionKey2
OptionKey { get; }
src\Workspaces\CoreTestUtilities\OptionsCollection.cs (6)
28
internal sealed class OptionsCollection(string languageName) : IReadOnlyCollection<KeyValuePair<
OptionKey2
, object?>>, IOptionsReader
30
private readonly Dictionary<
OptionKey2
, object?> _options = [];
37
public void Add<T>(
OptionKey2
optionKey, T value)
69
public void AddRange(IEnumerable<KeyValuePair<
OptionKey2
, object?>>? options)
78
public IEnumerator<KeyValuePair<
OptionKey2
, object?>> GetEnumerator()
125
public bool TryGetOption<T>(
OptionKey2
optionKey, out T value)
Microsoft.CodeAnalysis.CSharp.CodeStyle.UnitTests (7)
AbstractCSharpDiagnosticProviderBasedUserDiagnosticTest_OptionHelpers.cs (7)
15
internal static (
OptionKey2
, object) SingleOption<T>(Option2<T> option, T enabled)
18
internal (
OptionKey2
, object) SingleOption<T>(PerLanguageOption2<T> option, T value)
21
internal static (
OptionKey2
, object) SingleOption<T>(Option2<CodeStyleOption2<T>> option, T enabled, NotificationOption2 notification)
24
internal static (
OptionKey2
, object) SingleOption<T>(Option2<CodeStyleOption2<T>> option, CodeStyleOption2<T> codeStyle)
27
internal (
OptionKey2
, object) SingleOption<T>(PerLanguageOption2<CodeStyleOption2<T>> option, T enabled, NotificationOption2 notification)
30
internal (
OptionKey2
, object) SingleOption<T>(PerLanguageOption2<CodeStyleOption2<T>> option, CodeStyleOption2<T> codeStyle)
33
internal static (
OptionKey2
, object) SingleOption<T>(PerLanguageOption2<CodeStyleOption2<T>> option, CodeStyleOption2<T> codeStyle, string language)