3 interfaces inheriting from IOption2
Microsoft.CodeAnalysis.Workspaces (3)
220 references to IOption2
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Features (5)
Microsoft.CodeAnalysis.CSharp.Workspaces (8)
Microsoft.CodeAnalysis.EditorFeatures (31)
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (5)
Microsoft.CodeAnalysis.EditorFeatures.Wpf (8)
Microsoft.CodeAnalysis.Features (41)
IDEDiagnosticIdToOptionMappingHelper.cs (10)
23private static readonly ConcurrentDictionary<string, ImmutableHashSet<IOption2>> s_diagnosticIdToOptionMap = new();
24private static readonly ConcurrentDictionary<string, ConcurrentDictionary<string, ImmutableHashSet<IOption2>>> s_diagnosticIdToLanguageSpecificOptionsMap = new();
27public static bool TryGetMappedOptions(string diagnosticId, string language, [NotNullWhen(true)] out ImmutableHashSet<IOption2>? options)
39public static void AddOptionMapping(string diagnosticId, ImmutableHashSet<IOption2> options)
45var multipleLanguagesOptionsBuilder = ImmutableHashSet.CreateBuilder<IOption2>();
50foreach (var perLanguageValuedOption in group)
64foreach (var option in languageGroup)
71var map = s_diagnosticIdToLanguageSpecificOptionsMap.GetOrAdd(language, _ => new ConcurrentDictionary<string, ImmutableHashSet<IOption2>>());
84private static void AddOptionMapping(ConcurrentDictionary<string, ImmutableHashSet<IOption2>> map, string diagnosticId, ImmutableHashSet<IOption2> options)
Microsoft.CodeAnalysis.Workspaces (63)
PublicOptionFactory.cs (5)
45public StorageMapping(IOption2 internalOption, Func<object?, object?> toPublicValue, Func<object?, object?> toInternalValue)
59private static OptionDefinition<TPublicValue> ToPublicOptionDefinition<T, TPublicValue>(this OptionDefinition<T> definition, IOption2 internalOption, Func<T, TPublicValue> toPublicValue, Func<TPublicValue, T> toInternalValue)
127public static string PublicOptionDefinitionToString(this IOption2 option)
130public static bool PublicOptionDefinitionEquals(this IOption2 x, IOption2 y)
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (7)
Options\OptionsTestInfo.cs (6)
14internal readonly record struct OptionsTestInfo(IOption2 Option, ImmutableList<(string namespaceName, string qualifiedName, bool isPublic, IOption2 option)> Accessors)
51if (typeof(IOption2).IsAssignableFrom(field.FieldType))
55var option = (IOption2)field.GetValue(null)!;
72optionInfo = new OptionsTestInfo(option, ImmutableList.Create<(string, string, bool, IOption2)>((accessorNamespace!, accessor, isPublic, option)));
Microsoft.CodeAnalysis.Workspaces.UnitTests (9)
Microsoft.VisualStudio.IntegrationTest.Utilities (2)
Microsoft.VisualStudio.LanguageServices (2)
Microsoft.VisualStudio.LanguageServices.CSharp (5)
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (1)
Microsoft.VisualStudio.LanguageServices.Implementation (17)
Microsoft.VisualStudio.LanguageServices.New.IntegrationTests (1)
Microsoft.VisualStudio.LanguageServices.VisualBasic (4)
Roslyn.VisualStudio.DiagnosticsWindow (9)
OptionPages\InternalOptionsControl.cs (8)
20private readonly IEnumerable<IOption2> _options;
22public InternalOptionsControl(IEnumerable<IOption2> options, OptionStore optionStore)
112foreach (var option in _options)
126protected void AddOption(Panel panel, IOption2 option, string additional = null)
135protected void AddPerLanguageOption(Panel panel, IOption2 option, string languageName, string additional = null)
144private UIElement CreateControl(IOption2 option, string languageName = null, string additional = null)
195private void BindToCheckBox(CheckBox checkBox, IOption2 option, string languageName = null)
206private void BindToTextBox(TextBox textBox, IOption2 option, string languageName = null)
Roslyn.VisualStudio.Next.UnitTests (1)