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