3 writes to Option
Microsoft.CodeAnalysis.Workspaces (3)
OptionKey2.cs (3)
25Option = option; 37this.Option = option ?? throw new ArgumentNullException(nameof(option)); 44this.Option = option ?? throw new ArgumentNullException(nameof(option));
49 references to Option
Microsoft.CodeAnalysis.EditorFeatures (2)
EditorConfigSettings\Data\Setting.cs (2)
36Updater.QueueUpdate(Key.Option, UpdateValue(value)); 39public string Category => Key.Option.Definition.Group.Description;
Microsoft.CodeAnalysis.EditorFeatures.DiagnosticsTests.Utilities (3)
CodeActions\CodeFixVerifierHelper.cs (3)
125Assert.True(optionKey.Option.Definition.IsEditorConfigOption); 133analyzerConfig.AppendLine($"{optionKey.Option.Definition.ConfigName} = {optionKey.Option.Definition.Serializer.Serialize(value)}");
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (1)
Options\GlobalOptionsTests.cs (1)
75return (T)OptionsTestHelpers.GetDifferentValue(typeof(T), optionKey.Option.DefaultValue)!;
Microsoft.CodeAnalysis.Workspaces (13)
IOptionReader.cs (1)
29=> Options.TryGetEditorConfigOption(optionKey.Option, out value);
OptionKey2.cs (6)
55=> Option.Equals(other.Option) && Language == other.Language; 59var hash = Option?.GetHashCode() ?? 0; 71if (Option is null) 76var languageDisplay = Option.IsPerLanguage 80return languageDisplay + Option.ToString();
Options\GlobalOptionService.cs (2)
101return optionKey.Option.DefaultValue; 147Debug.Assert(optionKey.Option is IOption2 { Definition.StorageMapping: null });
Options\OptionChangedEventArgs.cs (1)
20public IOption2 Option => OptionKey.Option;
Options\OptionKey.cs (1)
15/// <inheritdoc cref="OptionKey2.Option"/>
Options\OptionSet.cs (1)
89value = (T)GetInternalOptionValue(new OptionKey(optionKey.Option, optionKey.Language))!;
StructuredAnalyzerConfigOptions.cs (1)
73=> this.TryGetEditorConfigOption(optionKey.Option, out value);
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (2)
OptionsCollection.cs (2)
39Debug.Assert(optionKey.Option is IOption2 { Definition.StorageMapping: null }); 85=> new TestOptionSet(_options.ToImmutableDictionary(entry => new OptionKey(entry.Key.Option, entry.Key.Language), entry => entry.Value));
Microsoft.VisualStudio.LanguageServices (19)
Options\FeatureFlagPersister.cs (2)
32if (optionKey.Option.DefaultValue is not bool defaultValue) 34throw ExceptionUtilities.UnexpectedValue(optionKey.Option.DefaultValue);
Options\LocalUserRegistryOptionPersister.cs (10)
61if (optionKey.Option.Type == typeof(bool)) 63value = subKey.GetValue(key, defaultValue: (bool)optionKey.Option.DefaultValue! ? 1 : 0).Equals(1); 66else if (optionKey.Option.Type == typeof(long)) 68var untypedValue = subKey.GetValue(key, defaultValue: optionKey.Option.DefaultValue); 85else if (optionKey.Option.Type == typeof(int)) 87var untypedValue = subKey.GetValue(key, defaultValue: optionKey.Option.DefaultValue); 107value = subKey.GetValue(key, defaultValue: optionKey.Option.DefaultValue); 109if (optionKey.Option.Type.IsEnum) 113value = Enum.ToObject(optionKey.Option.Type, value); 139var optionType = optionKey.Option.Type;
Options\PackageSettingsPersister.cs (2)
61if (optionKey.Option == SolutionCrawlerOptionsStorage.SolutionBackgroundAnalysisScopeOption) 81if (!Equals(optionKey.Option, SolutionCrawlerOptionsStorage.SolutionBackgroundAnalysisScopeOption))
Options\VisualStudioOptionPersister.cs (2)
44return VisualStudioOptionStorage.Storages.TryGetValue(optionKey.Option.Definition.ConfigName, out var storage) && TryFetch(storage, optionKey, out value); 58if (!VisualStudioOptionStorage.Storages.TryGetValue(optionKey.Option.Definition.ConfigName, out var storage))
Options\VisualStudioSettingsOptionPersister.cs (3)
79var result = TryReadAndMonitorOptionValue(optionKey, storageKey, storageKey, optionKey.Option.Type, optionKey.Option.DefaultValue); 86if (_readFallbacks.TryGetValue(optionKey.Option.Definition.ConfigName, out var lazyReadFallback))
Microsoft.VisualStudio.LanguageServices.CSharp (2)
EditorConfigSettings\BinaryOperatorSpacingOptionsViewModelFactory.cs (1)
30=> key.Option.Type == typeof(BinaryOperatorSpacingOptions);
EditorConfigSettings\LabelPositionOptionsViewModel.cs (1)
33=> key.Option.Type == typeof(LabelPositionOptions);
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (4)
EditorConfigSettings\DataProvider\DataProviderTests.cs (4)
127dataSnapShot.Select(setting => setting.Key.Option).OrderBy(o => o.Definition.ConfigName)); 172AssertEx.SetEqual(optionsWithUI, dataSnapShot.Select(setting => setting.Key.Option)); 196dataSnapShot.Select(item => item.Key.Option.Definition.ConfigName).OrderBy(n => n)); 209var optionsForSettings = dataSnapshot.GroupBy(s => s.Key.Option).Select(g => g.Key).ToArray();
Microsoft.VisualStudio.LanguageServices.Implementation (3)
Options\OptionBinding.cs (1)
26if (e.Option == _option)
Options\OptionLogger.cs (1)
30m[ConfigName] = optionKey.Option.Definition.ConfigName;
Options\PerLanguageOptionBinding.cs (1)
28if (e.Option == _option)