62 instantiations of OptionKey2
Microsoft.CodeAnalysis.EditorFeatures (8)
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (2)
Microsoft.CodeAnalysis.Features (2)
Microsoft.CodeAnalysis.LanguageServer.Protocol (2)
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (4)
Microsoft.CodeAnalysis.Workspaces (13)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\Option2.cs (1)
106=> new(option);
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (5)
Microsoft.CodeAnalysis.Workspaces.UnitTests (10)
WorkspaceServiceTests\GlobalOptionServiceTests.cs (10)
124[KeyValuePair.Create(new OptionKey2(FormattingOptions2.NewLine, "lang"), (object?)"NEW_LINE")],
177var values = globalOptions.GetOptions([new OptionKey2(option1), new OptionKey2(option2)]);
183KeyValuePair.Create(new OptionKey2(option1), (object?)5),
184KeyValuePair.Create(new OptionKey2(option2), (object?)6),
185KeyValuePair.Create(new OptionKey2(option3), (object?)3),
194values = globalOptions.GetOptions([new OptionKey2(option1), new OptionKey2(option2), new OptionKey2(option3)]);
316var optionKey = new OptionKey2(option, language);
Microsoft.VisualStudio.LanguageServices (8)
Microsoft.VisualStudio.LanguageServices.Implementation (6)
Roslyn.VisualStudio.Next.UnitTests (2)
137 references to OptionKey2
Microsoft.CodeAnalysis.EditorFeatures (13)
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (8)
Microsoft.CodeAnalysis.ExternalAccess.Razor.Features (6)
Microsoft.CodeAnalysis.Features (1)
Microsoft.CodeAnalysis.LanguageServer.Protocol (1)
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (3)
Options\SolutionAnalyzerConfigOptionsUpdaterTests.cs (3)
61new KeyValuePair<OptionKey2, object?>(FormattingOptions2.InsertFinalNewLine, true),
62new KeyValuePair<OptionKey2, object?>(new OptionKey2(FormattingOptions2.IndentationSize, LanguageNames.CSharp), 3),
63new KeyValuePair<OptionKey2, object?>(new OptionKey2(FormattingOptions2.IndentationSize, LanguageNames.VisualBasic), 5)
Microsoft.CodeAnalysis.Workspaces (38)
Options\GlobalOptionService.cs (18)
29private ImmutableDictionary<OptionKey2, object?> _currentValues = ImmutableDictionary.Create<OptionKey2, object?>();
41private static object? LoadOptionFromPersisterOrGetDefault(OptionKey2 optionKey, ImmutableArray<IOptionPersister> persisters)
56bool IOptionsReader.TryGetOption<T>(OptionKey2 optionKey, out T value)
68public T GetOption<T>(OptionKey2 optionKey)
85public ImmutableArray<object?> GetOptions(ImmutableArray<OptionKey2> optionKeys)
92foreach (var optionKey in optionKeys)
109foreach (var optionKey in optionKeys)
119private static object? GetOption_NoLock(ref ImmutableDictionary<OptionKey2, object?> currentValues, OptionKey2 optionKey, ImmutableArray<IOptionPersister> persisters)
142public void SetGlobalOption(OptionKey2 optionKey, object? value)
145public bool SetGlobalOptions(ImmutableArray<KeyValuePair<OptionKey2, object?>> options)
148private bool SetGlobalOptions(OneOrMany<KeyValuePair<OptionKey2, object?>> options)
150using var _ = ArrayBuilder<(OptionKey2, object?)>.GetInstance(options.Count, out var changedOptions);
185private static void PersistOption(ImmutableArray<IOptionPersister> persisters, OptionKey2 optionKey, object? value)
196public bool RefreshOption(OptionKey2 optionKey, object? newValue)
226private void RaiseOptionChangedEvent(ImmutableArray<(OptionKey2, object?)> changedOptions)
250_instance._currentValues = ImmutableDictionary.Create<OptionKey2, object?>();
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (6)
Microsoft.CodeAnalysis.Workspaces.UnitTests (2)
Microsoft.VisualStudio.LanguageServices (41)
Options\AbstractVisualStudioSettingsOptionPersister.cs (9)
18private readonly Action<OptionKey2, object?> _refreshOption;
20private ImmutableDictionary<string, (OptionKey2 primaryOptionKey, string primaryStorageKey)> _storageKeysToMonitorForChanges
21= ImmutableDictionary<string, (OptionKey2, string)>.Empty;
26Action<OptionKey2, object?> refreshOption,
42public virtual bool TryFetch(OptionKey2 optionKey, string storageKey, out object? value)
45protected bool TryFetchWorker(OptionKey2 optionKey, string storageKey, Type optionType, out object? value)
58public Optional<object?> TryReadAndMonitorOptionValue(OptionKey2 primaryOptionKey, string primaryStorageKey, string storageKey, Type storageType)
64internal abstract Optional<object?> TryReadOptionValue(OptionKey2 optionKey, string storageKey, Type storageType);
66public abstract Task PersistAsync(OptionKey2 optionKey, string storageKey, object? value);
Options\VisualStudioOptionStorage.cs (7)
41public Task PersistAsync(VisualStudioUnifiedSettingsOptionPersister persister, OptionKey2 optionKey, object? value)
44public bool TryFetch(VisualStudioUnifiedSettingsOptionPersister persister, OptionKey2 optionKey, out object? value)
94public Task PersistAsync(VisualStudioSettingsOptionPersister persister, OptionKey2 optionKey, object? value)
97public bool TryFetch(VisualStudioSettingsOptionPersister persister, OptionKey2 optionKey, out object? value)
116public bool TryFetch(FeatureFlagPersister persister, OptionKey2 optionKey, out object? value)
125public Task PersistAsync(LocalUserRegistryOptionPersister persister, OptionKey2 optionKey, object? value)
131public bool TryFetch(LocalUserRegistryOptionPersister persister, OptionKey2 optionKey, out object? value)
Microsoft.VisualStudio.LanguageServices.CSharp (2)
Microsoft.VisualStudio.LanguageServices.Implementation (13)
Options\OptionStore.cs (11)
21public event EventHandler<OptionKey2>? OptionChanged;
26private ImmutableDictionary<OptionKey2, object?> _globalValues;
31private ImmutableDictionary<OptionKey2, object?> _updatedValues;
37_globalValues = ImmutableDictionary<OptionKey2, object?>.Empty;
38_updatedValues = ImmutableDictionary<OptionKey2, object?>.Empty;
43_globalValues = ImmutableDictionary<OptionKey2, object?>.Empty;
44_updatedValues = ImmutableDictionary<OptionKey2, object?>.Empty;
47public ImmutableArray<(OptionKey2 key, object? oldValue, object? newValue)> GetChangedOptions()
50bool IOptionsReader.TryGetOption<T>(OptionKey2 optionKey, out T value)
68private object? GetOption(OptionKey2 optionKey)
97private void SetOption(OptionKey2 optionKey, object? value)
Roslyn.VisualStudio.Next.UnitTests (3)