1 write to Option
Microsoft.CodeAnalysis.Workspaces (1)
Options\OptionKey.cs (1)
37Option = option;
19 references to Option
Microsoft.CodeAnalysis.Workspaces (14)
Options\DocumentOptionSet.cs (1)
71if (optionKey.Option is not IOption2 internallyDefinedOption)
Options\EmptyOptionSet.cs (1)
14=> optionKey.Option.DefaultValue;
Options\OptionKey.cs (6)
43return OptionEqual(Option, other.Option) && Language == other.Language; 60var hash = Option?.GetHashCode() ?? 0; 72if (Option is null) 77var languageDisplay = Option.IsPerLanguage 81return languageDisplay + Option.ToString();
Options\OptionSet.cs (2)
26if (optionKey.Option is IOption2 { Definition.StorageMapping: { } mapping }) 73if (optionAndLanguage.Option is IOption2 { Definition.StorageMapping: { } mapping })
Options\SolutionOptionSet.cs (4)
54value = (optionKey.Option is IOption2 internallyDefinedOption) 81var internallyDefined = _changedOptionKeys.Where(key => key.Option is IOption2).SelectAsArray(key => KeyValuePairUtil.Create(new OptionKey2((IOption2)key.Option, key.Language), _values[key])); 82var externallyDefined = _changedOptionKeys.Where(key => key.Option is not IOption2).SelectAsArray(key => KeyValuePairUtil.Create(key, _values[key]));
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (1)
Fakes\TestOptionSet.cs (1)
25=> _values.TryGetValue(optionKey, out var value) ? value : optionKey.Option.DefaultValue;
Microsoft.CodeAnalysis.Workspaces.UnitTests (4)
WorkspaceServiceTests\GlobalOptionServiceTests.cs (4)
66Assert.Equal(optionKey.Option.DefaultValue, optionSet.GetOption<int>(optionKey)); 67Assert.Equal(perLanguageOptionKey.Option.DefaultValue, optionSet.GetOption<int>(perLanguageOptionKey)); 99Assert.Equal(perLanguageOptionKey.Option.DefaultValue, optionSet.GetOption<string>(perLanguageOptionKey)); 109Assert.Equal(perLanguageOptionKey.Option.DefaultValue, oldSolution2.Options.GetOption<string>(perLanguageOptionKey));