1 interface inheriting from IOption
Microsoft.CodeAnalysis.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\IOption2.cs (1)
18, IOption
2 implementations of IOption
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (1)
Completion\CompletionServiceTests.cs (1)
87private sealed class ThirdPartyOption : IOption
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (1)
Options\TestOption.cs (1)
11internal class TestOption : IOption
39 references to IOption
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (1)
Configuration\DidChangeConfigurationNotificationHandlerTest.cs (1)
318static bool TryGetValueNonDefaultValueBasedOnName(IOption option, out object? nonDefaultValue)
Microsoft.CodeAnalysis.Workspaces (20)
Options\Option.cs (2)
82object? IOption.DefaultValue => this.DefaultValue; 84bool IOption.IsPerLanguage => false;
Options\OptionKey.cs (4)
15public IOption Option { get; } 20public OptionKey(IOption option, string? language = null) 45static bool OptionEqual(IOption thisOption, IOption otherOption)
Options\PerLanguageOption.cs (2)
76object? IOption.DefaultValue => this.DefaultValue; 80bool IOption.IsPerLanguage => true;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\Option2.cs (6)
82string IOption.Feature => "config"; 83string IOption.Name => Definition.ConfigName; 84object? IOption.DefaultValue => Definition.DefaultValue; 85bool IOption.IsPerLanguage => false; 86Type IOption.Type => Definition.Type; 87ImmutableArray<OptionStorageLocation> IOption.StorageLocations => [];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\PerLanguageOption2.cs (6)
70string IOption.Feature => "config"; 71string IOption.Name => Definition.ConfigName; 72object? IOption.DefaultValue => Definition.DefaultValue; 73bool IOption.IsPerLanguage => true; 74Type IOption.Type => Definition.Type; 75ImmutableArray<OptionStorageLocation> IOption.StorageLocations => [];
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (11)
Options\OptionsTestHelpers.cs (11)
25public static readonly ImmutableArray<(IOption, object)> PublicCustomOptionsWithNonDefaultValues = ImmutableArray.Create<(IOption, object)>( 28public static readonly ImmutableArray<(IOption, object)> PublicAutoFormattingOptionsWithNonDefaultValues = ImmutableArray.Create<(IOption, object)>( 31public static readonly ImmutableArray<(IOption, object)> PublicFormattingOptionsWithNonDefaultValues = ImmutableArray.Create<(IOption, object)>( 84public static readonly ImmutableArray<(IOption, object)> PublicCodeStyleOptionsWithNonDefaultValues = ImmutableArray.Create<(IOption, object)>( 92public static readonly IEnumerable<(IOption, object)> AllPublicOptionsWithNonDefaultValues = 98public static OptionSet GetOptionSetWithChangedOptions(OptionSet options, IEnumerable<(IOption, object)> optionsWithNonDefaultValues) 112public static IEnumerable<string?> GetApplicableLanguages(IOption option)
Microsoft.CodeAnalysis.Workspaces.UnitTests (7)
Options\OptionKeyTests.cs (4)
81Assert.Equal("config", ((IOption)option1).Feature); 82Assert.Equal("name", ((IOption)option1).Name); 87Assert.Equal("config", ((IOption)option2).Feature); 88Assert.Equal("name", ((IOption)option2).Name);
Simplifier\SimplifierTests.cs (1)
101var publicOptions = new (IOption, object)[]
WorkspaceServiceTests\GlobalOptionServiceTests.cs (2)
60var option = subclass ? (IOption)new TestOption<int>(defaultValue: 1) : new TestOption() { DefaultValue = 1 }; 61var perLanguageOption = subclass ? (IOption)new PerLanguageTestOption<int>(defaultValue: 1) : new TestOption() { IsPerLanguage = true, DefaultValue = 1 };