3 interfaces inheriting from IOption2
Microsoft.CodeAnalysis.Workspaces (3)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\IPublicOption.cs (1)
13internal interface IPublicOption : IOption2
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\Option2.cs (1)
15internal interface ISingleValuedOption : IOption2
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\PerLanguageOption2.cs (1)
15internal interface IPerLanguageValuedOption : IOption2
60 references to IOption2
Microsoft.CodeAnalysis.Features (2)
src\Analyzers\Core\Analyzers\AbstractBuiltInCodeStyleDiagnosticAnalyzer.cs (2)
19/// unique <see cref="IOption2"/> code style option. 50/// two or more <see cref="IOption2 "/> code style options.
Microsoft.CodeAnalysis.Workspaces (58)
Options\DocumentOptionSet.cs (1)
71if (optionKey.Option is not IOption2 internallyDefinedOption)
Options\GlobalOptionService.cs (1)
163Debug.Assert(optionKey.Option is IOption2 { Definition.StorageMapping: null });
Options\Option.cs (6)
86IPublicOption? IOption2.PublicOption => null; 88OptionDefinition IOption2.Definition => _optionDefinition; 90bool IEquatable<IOption2?>.Equals(IOption2? other) => Equals(other); 96public override bool Equals(object? obj) => Equals(obj as IOption2); 98private bool Equals(IOption2? other)
Options\OptionChangedEventArgs.cs (1)
14public bool HasOption(Func<IOption2, bool> predicate)
Options\OptionKey.cs (2)
47if (thisOption is not IOption2 thisOption2 || 48otherOption is not IOption2 otherOption2)
Options\OptionSet.cs (2)
26if (optionKey.Option is IOption2 { Definition.StorageMapping: { } mapping }) 73if (optionAndLanguage.Option is IOption2 { Definition.StorageMapping: { } mapping })
Options\PerLanguageOption.cs (6)
74OptionDefinition IOption2.Definition => _optionDefinition; 78IPublicOption? IOption2.PublicOption => null; 82bool IEquatable<IOption2?>.Equals(IOption2? other) => Equals(other); 88public override bool Equals(object? obj) => Equals(obj as IOption2); 90private bool Equals(IOption2? other)
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]));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleHelpers.cs (3)
118this ImmutableArray<IOption2>.Builder optionsBuilder, 131this ImmutableArray<IOption2>.Builder optionsBuilder, 143this ImmutableArray<IOption2>.Builder optionsBuilder,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOptions2.cs (3)
20private static readonly ImmutableArray<IOption2>.Builder s_editorConfigOptionsBuilder = ImmutableArray.CreateBuilder<IOption2>(); 350internal static readonly ImmutableArray<IOption2> EditorConfigOptions = s_editorConfigOptionsBuilder.ToImmutable();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\VisualBasic\VisualBasicCodeStyleOptions.cs (3)
16private static readonly ImmutableArray<IOption2>.Builder s_allOptionsBuilder = ImmutableArray.CreateBuilder<IOption2>(); 57public static ImmutableArray<IOption2> EditorConfigOptions => s_allOptionsBuilder.ToImmutable();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Editing\GenerationOptions.cs (1)
30public static readonly ImmutableArray<IOption2> EditorConfigOptions = [PlaceSystemNamespaceFirst, SeparateImportDirectiveGroups];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\AnalyzerConfigOptionsExtensions.cs (3)
15public static T GetEditorConfigOption<T>(this AnalyzerConfigOptions analyzerConfigOptions, IOption2 option, T defaultValue) 18public static T GetEditorConfigOptionValue<T>(this AnalyzerConfigOptions analyzerConfigOptions, IOption2 option, T defaultValue) 21public static bool TryGetEditorConfigOption<T>(this AnalyzerConfigOptions analyzerConfigOptions, IOption2 option, out T value)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\FormattingOptions2.cs (2)
98internal static readonly ImmutableArray<IOption2> EditorConfigOptions = [UseTabs, TabSize, IndentationSize, NewLine, InsertFinalNewLine]; 103internal static readonly ImmutableArray<IOption2> UndocumentedOptions = [WrappingColumn, ConditionalExpressionWrappingLength];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\InternalOptionStorageMapping.cs (2)
11internal abstract class OptionStorageMapping(IOption2 internalOption) 16public IOption2 InternalOption { get; } = internalOption;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\IOption2.cs (2)
13/// This ensures that all the sub-types of <see cref="IOption2"/> in either layer see an identical 16internal interface IOption2 : IEquatable<IOption2?>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\Option2.cs (4)
42internal Option2(OptionDefinition<T> definition, string? languageName, Func<IOption2, IPublicOption>? publicOptionFactory) 77OptionDefinition IOption2.Definition => Definition; 94public override bool Equals(object? obj) => Equals(obj as IOption2); 96public bool Equals(IOption2? other)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\OptionKey2.cs (2)
18public IOption2 Option { get; } 21public OptionKey2(IOption2 option, string? language)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\PerLanguageOption2.cs (4)
33internal PerLanguageOption2(OptionDefinition<T> optionDefinition, Func<IOption2, IPublicOption>? publicOptionFactory) 64OptionDefinition IOption2.Definition => Definition; 81public override bool Equals(object? obj) => Equals(obj as IOption2); 83public bool Equals(IOption2? other)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\PublicOptionFactory.cs (5)
40private sealed class StorageMapping(IOption2 internalOption, Func<object?, object?> toPublicValue, Func<object?, object?> toInternalValue) : OptionStorageMapping(internalOption) 49private static OptionDefinition<TPublicValue> ToPublicOptionDefinition<T, TPublicValue>(this OptionDefinition<T> definition, IOption2 internalOption, Func<T, TPublicValue> toPublicValue, Func<TPublicValue, T> toInternalValue) 117public static string PublicOptionDefinitionToString(this IOption2 option) 120public static bool PublicOptionDefinitionEquals(this IOption2 x, IOption2 y)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Options\MemberDisplayOptions.cs (1)
39public static readonly ImmutableArray<IOption2> EditorConfigOptions = [HideAdvancedMembers];