1 type derived from PerLanguageOption
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (1)
Options\TestOption.cs (1)
31internal class PerLanguageTestOption<T> : PerLanguageOption<T>
16 instantiations of PerLanguageOption
Microsoft.CodeAnalysis.Workspaces (7)
Simplification\SimplificationOptions.cs (7)
59public static PerLanguageOption<bool> QualifyMemberAccessWithThisOrMe { get; } = new PerLanguageOption<bool>("SimplificationOptions", "QualifyMemberAccessWithThisOrMe", defaultValue: false); 65public static PerLanguageOption<bool> QualifyFieldAccess { get; } = new PerLanguageOption<bool>("SimplificationOptions", "QualifyFieldAccess", defaultValue: false); 71public static PerLanguageOption<bool> QualifyPropertyAccess { get; } = new("SimplificationOptions", "QualifyPropertyAccess", defaultValue: false); 77public static PerLanguageOption<bool> QualifyMethodAccess { get; } = new("SimplificationOptions", "QualifyMethodAccess", defaultValue: false); 83public static PerLanguageOption<bool> QualifyEventAccess { get; } = new("SimplificationOptions", "QualifyEventAccess", defaultValue: false); 89public static PerLanguageOption<bool> PreferIntrinsicPredefinedTypeKeywordInDeclaration { get; } = new("SimplificationOptions", "PreferIntrinsicPredefinedTypeKeywordInDeclaration", defaultValue: true); 95public static PerLanguageOption<bool> PreferIntrinsicPredefinedTypeKeywordInMemberAccess { get; } = new("SimplificationOptions", "PreferIntrinsicPredefinedTypeKeywordInMemberAccess", defaultValue: true);
Microsoft.CodeAnalysis.Workspaces.UnitTests (9)
Options\OptionKeyTests.cs (8)
32Assert.Throws<ArgumentNullException>(() => new PerLanguageOption<bool>("Test Feature", null!, false)); 33Assert.Throws<ArgumentNullException>(() => new PerLanguageOption<bool>(null!, "Test Name", false)); 34Assert.Throws<ArgumentNullException>(() => new PerLanguageOption<bool>("X", "Test Name", false, storageLocations: null!)); 58var option = new PerLanguageOption<bool>("X", "Test Name", false, storage1, storage2, storage3); 119var option = new PerLanguageOption<bool>("FooFeature", "BarName", false); 142var option1 = new PerLanguageOption<bool>("FooFeature", "BarName", defaultValue: false); 143var option2 = new PerLanguageOption<bool>("FooFeature", "BarName", defaultValue: true); 144var option3 = new PerLanguageOption<bool>("FormattingOptions", "UseTabs", FormattingOptions.UseTabs.DefaultValue);
WorkspaceServiceTests\GlobalOptionServiceTests.cs (1)
150var optionvalid = new PerLanguageOption<bool>("Test Feature", "Test Name", false);
38 references to PerLanguageOption
Microsoft.CodeAnalysis.Workspaces (30)
CodeStyle\CodeStyleOptions.cs (6)
15public static readonly PerLanguageOption<CodeStyleOption<bool>> QualifyFieldAccess = 19public static readonly PerLanguageOption<CodeStyleOption<bool>> QualifyPropertyAccess = 23public static readonly PerLanguageOption<CodeStyleOption<bool>> QualifyMethodAccess = 27public static readonly PerLanguageOption<CodeStyleOption<bool>> QualifyEventAccess = 31public static readonly PerLanguageOption<CodeStyleOption<bool>> PreferIntrinsicPredefinedTypeKeywordInDeclaration = 35public static readonly PerLanguageOption<CodeStyleOption<bool>> PreferIntrinsicPredefinedTypeKeywordInMemberAccess =
Formatting\FormattingOptions.cs (6)
15public static PerLanguageOption<bool> UseTabs { get; } = FormattingOptions2.UseTabs.ToPublicOption(); 18public static PerLanguageOption<int> TabSize { get; } = FormattingOptions2.TabSize.ToPublicOption(); 21public static PerLanguageOption<int> IndentationSize { get; } = FormattingOptions2.IndentationSize.ToPublicOption(); 24public static PerLanguageOption<string> NewLine { get; } = FormattingOptions2.NewLine.ToPublicOption(); 27public static PerLanguageOption<IndentStyle> SmartIndent { get; } = (PerLanguageOption<IndentStyle>)FormattingOptions2.SmartIndent.PublicOption!;
Options\DocumentOptionSet.cs (3)
17/// pass that information redundantly when calling <see cref="GetOption{T}(PerLanguageOption{T})"/>. 90public T GetOption<T>(PerLanguageOption<T> option) 99public DocumentOptionSet WithChangedOption<T>(PerLanguageOption<T> option, T value)
Options\OptionSet.cs (2)
58public T GetOption<T>(PerLanguageOption<T> option, string? language) 64public OptionSet WithChangedOption<T>(PerLanguageOption<T> option, string? language, T value)
Recommendations\RecommendationOptions.cs (2)
13public static PerLanguageOption<bool> HideAdvancedMembers { get; } = RecommendationOptions2.HideAdvancedMembers.ToPublicOption(); 14public static PerLanguageOption<bool> FilterOutOfScopeLocals { get; } = RecommendationOptions2.FilterOutOfScopeLocals.ToPublicOption();
Simplification\SimplificationOptions.cs (7)
59public static PerLanguageOption<bool> QualifyMemberAccessWithThisOrMe { get; } = new PerLanguageOption<bool>("SimplificationOptions", "QualifyMemberAccessWithThisOrMe", defaultValue: false); 65public static PerLanguageOption<bool> QualifyFieldAccess { get; } = new PerLanguageOption<bool>("SimplificationOptions", "QualifyFieldAccess", defaultValue: false); 71public static PerLanguageOption<bool> QualifyPropertyAccess { get; } = new("SimplificationOptions", "QualifyPropertyAccess", defaultValue: false); 77public static PerLanguageOption<bool> QualifyMethodAccess { get; } = new("SimplificationOptions", "QualifyMethodAccess", defaultValue: false); 83public static PerLanguageOption<bool> QualifyEventAccess { get; } = new("SimplificationOptions", "QualifyEventAccess", defaultValue: false); 89public static PerLanguageOption<bool> PreferIntrinsicPredefinedTypeKeywordInDeclaration { get; } = new("SimplificationOptions", "PreferIntrinsicPredefinedTypeKeywordInDeclaration", defaultValue: true); 95public static PerLanguageOption<bool> PreferIntrinsicPredefinedTypeKeywordInMemberAccess { get; } = new("SimplificationOptions", "PreferIntrinsicPredefinedTypeKeywordInMemberAccess", defaultValue: true);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\PublicOptionFactory.cs (4)
95public static PerLanguageOption<T> ToPublicOption<T>(this PerLanguageOption2<T> option) 98return (PerLanguageOption<T>)option.PublicOption; 107public static PerLanguageOption<CodeStyleOption<T>> ToPublicOption<T>(this PerLanguageOption2<CodeStyleOption2<T>> option) 110return (PerLanguageOption<CodeStyleOption<T>>)option.PublicOption;
Microsoft.CodeAnalysis.Workspaces.UnitTests (8)
Options\OptionKeyTests.cs (6)
58var option = new PerLanguageOption<bool>("X", "Test Name", false, storage1, storage2, storage3); 119var option = new PerLanguageOption<bool>("FooFeature", "BarName", false); 142var option1 = new PerLanguageOption<bool>("FooFeature", "BarName", defaultValue: false); 143var option2 = new PerLanguageOption<bool>("FooFeature", "BarName", defaultValue: true); 144var option3 = new PerLanguageOption<bool>("FormattingOptions", "UseTabs", FormattingOptions.UseTabs.DefaultValue); 169var publicOption = CodeStyleOptions.PreferIntrinsicPredefinedTypeKeywordInMemberAccess;
SolutionTests\SolutionTests.cs (1)
5390var option = FormattingOptions.UseTabs;
WorkspaceServiceTests\GlobalOptionServiceTests.cs (1)
150var optionvalid = new PerLanguageOption<bool>("Test Feature", "Test Name", false);