71 instantiations of OptionKey2
Microsoft.CodeAnalysis.EditorFeatures (8)
Microsoft.CodeAnalysis.EditorFeatures.DiagnosticsTests.Utilities (8)
CodeActions\AbstractCodeActionOrUserDiagnosticTest_OptionHelpers.cs (7)
14=> (new OptionKey2(option), enabled);
17=> (new OptionKey2(option, this.GetLanguage()), value);
20=> (new OptionKey2(option), new CodeStyleOption2<T>(enabled, notification));
23=> (new OptionKey2(option), codeStyle);
26=> (new OptionKey2(option, this.GetLanguage()), new CodeStyleOption2<T>(enabled, notification));
29=> (new OptionKey2(option, this.GetLanguage()), codeStyle);
32=> (new OptionKey2(option, language), codeStyle);
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (2)
Microsoft.CodeAnalysis.EditorFeatures.Wpf (1)
Microsoft.CodeAnalysis.Workspaces (15)
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (5)
Microsoft.CodeAnalysis.Workspaces.UnitTests (10)
WorkspaceServiceTests\GlobalOptionServiceTests.cs (10)
127ImmutableArray.Create(KeyValuePairUtil.Create(new OptionKey2(FormattingOptions2.NewLine, "lang"), (object?)"NEW_LINE")),
180var values = globalOptions.GetOptions(ImmutableArray.Create(new OptionKey2(option1), new OptionKey2(option2)));
185KeyValuePairUtil.Create(new OptionKey2(option1), (object?)5),
186KeyValuePairUtil.Create(new OptionKey2(option2), (object?)6),
187KeyValuePairUtil.Create(new OptionKey2(option3), (object?)3)));
195values = globalOptions.GetOptions(ImmutableArray.Create(new OptionKey2(option1), new OptionKey2(option2), new OptionKey2(option3)));
317var optionKey = new OptionKey2(option, language);
Microsoft.VisualStudio.IntegrationTest.Utilities (4)
Microsoft.VisualStudio.LanguageServices (10)
Microsoft.VisualStudio.LanguageServices.Implementation (6)
Microsoft.VisualStudio.LanguageServices.New.IntegrationTests (1)
Roslyn.VisualStudio.Next.UnitTests (1)
139 references to OptionKey2
Microsoft.CodeAnalysis.EditorFeatures (13)
Microsoft.CodeAnalysis.EditorFeatures.DiagnosticsTests.Utilities (9)
CodeActions\AbstractCodeActionOrUserDiagnosticTest_OptionHelpers.cs (7)
13internal static (OptionKey2, object?) SingleOption<T>(Option2<T> option, T enabled)
16internal (OptionKey2, object?) SingleOption<T>(PerLanguageOption2<T> option, T value)
19internal static (OptionKey2, object) SingleOption<T>(Option2<CodeStyleOption2<T>> option, T enabled, NotificationOption2 notification)
22internal static (OptionKey2, object) SingleOption<T>(Option2<CodeStyleOption2<T>> option, CodeStyleOption2<T> codeStyle)
25internal (OptionKey2, object) SingleOption<T>(PerLanguageOption2<CodeStyleOption2<T>> option, T enabled, NotificationOption2 notification)
28internal (OptionKey2, object) SingleOption<T>(PerLanguageOption2<CodeStyleOption2<T>> option, CodeStyleOption2<T> codeStyle)
31internal static (OptionKey2, object) SingleOption<T>(PerLanguageOption2<CodeStyleOption2<T>> option, CodeStyleOption2<T> codeStyle, string language)
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (8)
Microsoft.CodeAnalysis.ExternalAccess.Razor (6)
Microsoft.CodeAnalysis.Workspaces (42)
Options\GlobalOptionService.cs (14)
30private ImmutableDictionary<OptionKey2, object?> _currentValues;
45_currentValues = ImmutableDictionary.Create<OptionKey2, object?>();
89private static object? LoadOptionFromPersisterOrGetDefault(OptionKey2 optionKey, ImmutableArray<IOptionPersister> persisters)
104bool IOptionsReader.TryGetOption<T>(OptionKey2 optionKey, out T value)
116public T GetOption<T>(OptionKey2 optionKey)
127public ImmutableArray<object?> GetOptions(ImmutableArray<OptionKey2> optionKeys)
135foreach (var optionKey in optionKeys)
144private object? GetOption_NoLock(OptionKey2 optionKey, ImmutableArray<IOptionPersister> persisters)
167public void SetGlobalOption(OptionKey2 optionKey, object? value)
170public bool SetGlobalOptions(ImmutableArray<KeyValuePair<OptionKey2, object?>> options)
173private bool SetGlobalOptions(OneOrMany<KeyValuePair<OptionKey2, object?>> options)
207private static void PersistOption(ImmutableArray<IOptionPersister> persisters, OptionKey2 optionKey, object? value)
218public bool RefreshOption(OptionKey2 optionKey, object? newValue)
259_currentValues = ImmutableDictionary.Create<OptionKey2, object?>();
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (5)
Microsoft.CodeAnalysis.Workspaces.UnitTests (4)
Microsoft.VisualStudio.IntegrationTest.Utilities (2)
Microsoft.VisualStudio.LanguageServices (32)
Options\VisualStudioOptionStorage.cs (5)
69public Task PersistAsync(VisualStudioSettingsOptionPersister persister, OptionKey2 optionKey, object? value)
72public bool TryFetch(VisualStudioSettingsOptionPersister persister, OptionKey2 optionKey, out object? value)
91public bool TryFetch(FeatureFlagPersister persister, OptionKey2 optionKey, out object? value)
106public Task PersistAsync(LocalUserRegistryOptionPersister persister, OptionKey2 optionKey, object? value)
112public bool TryFetch(LocalUserRegistryOptionPersister persister, OptionKey2 optionKey, out object? value)
Options\VisualStudioSettingsOptionPersister.cs (6)
35private readonly Action<OptionKey2, object?> _refreshOption;
42private ImmutableDictionary<string, (OptionKey2 primaryOptionKey, string primaryStorageKey)> _storageKeysToMonitorForChanges
43= ImmutableDictionary<string, (OptionKey2, string)>.Empty;
48public VisualStudioSettingsOptionPersister(Action<OptionKey2, object?> refreshOption, ImmutableDictionary<string, Lazy<IVisualStudioStorageReadFallback, OptionNameMetadata>> readFallbacks, ISettingsManager? settingsManager)
77public bool TryFetch(OptionKey2 optionKey, string storageKey, out object? value)
103public Optional<object?> TryReadAndMonitorOptionValue(OptionKey2 primaryOptionKey, string primaryStorageKey, string storageKey, Type storageType, object? defaultValue)
Microsoft.VisualStudio.LanguageServices.CSharp (2)
Microsoft.VisualStudio.LanguageServices.Implementation (13)
Options\OptionStore.cs (11)
27public event EventHandler<OptionKey2>? OptionChanged;
32private ImmutableDictionary<OptionKey2, object?> _globalValues;
37private ImmutableDictionary<OptionKey2, object?> _updatedValues;
43_globalValues = ImmutableDictionary<OptionKey2, object?>.Empty;
44_updatedValues = ImmutableDictionary<OptionKey2, object?>.Empty;
49_globalValues = ImmutableDictionary<OptionKey2, object?>.Empty;
50_updatedValues = ImmutableDictionary<OptionKey2, object?>.Empty;
53public ImmutableArray<(OptionKey2 key, object? oldValue, object? newValue)> GetChangedOptions()
56bool IOptionsReader.TryGetOption<T>(OptionKey2 optionKey, out T value)
74private object? GetOption(OptionKey2 optionKey)
103private void SetOption(OptionKey2 optionKey, object? value)
Microsoft.VisualStudio.LanguageServices.New.IntegrationTests (1)
Roslyn.VisualStudio.Next.UnitTests (2)