1 type derived from PerLanguageOption
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (1)
Options\TestOption.cs (1)
31
internal class PerLanguageTestOption<T> :
PerLanguageOption
<T>
18 instantiations of PerLanguageOption
Microsoft.CodeAnalysis.Workspaces (8)
PublicOptionFactory.cs (1)
81
publicOptionFactory: internalOption => new
PerLanguageOption
<TPublicValue>(
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 (10)
Options\OptionKeyTests.cs (9)
34
Assert.Throws<ArgumentNullException>(() => new
PerLanguageOption
<bool>("Test Feature", null!, false));
35
Assert.Throws<ArgumentNullException>(() => new
PerLanguageOption
<bool>(null!, "Test Name", false));
36
Assert.Throws<ArgumentNullException>(() => new
PerLanguageOption
<bool>("X", "Test Name", false, storageLocations: null!));
37
Assert.Throws<ArgumentNullException>(() => new
PerLanguageOption
<bool>("X", "Test Name", false, storageLocations: new OptionStorageLocation[] { null! }));
60
var option = new
PerLanguageOption
<bool>("X", "Test Name", false, storage1, storage2, storage3);
121
var option = new
PerLanguageOption
<bool>("FooFeature", "BarName", false);
144
var option1 = new
PerLanguageOption
<bool>("FooFeature", "BarName", defaultValue: false);
145
var option2 = new
PerLanguageOption
<bool>("FooFeature", "BarName", defaultValue: true);
146
var option3 = new
PerLanguageOption
<bool>("FormattingOptions", "UseTabs", FormattingOptions.UseTabs.DefaultValue);
WorkspaceServiceTests\GlobalOptionServiceTests.cs (1)
152
var optionvalid = new
PerLanguageOption
<bool>("Test Feature", "Test Name", false);
39 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)
16
public static
PerLanguageOption
<bool> UseTabs { get; } = FormattingOptions2.UseTabs.ToPublicOption();
19
public static
PerLanguageOption
<int> TabSize { get; } = FormattingOptions2.TabSize.ToPublicOption();
22
public static
PerLanguageOption
<int> IndentationSize { get; } = FormattingOptions2.IndentationSize.ToPublicOption();
25
public static
PerLanguageOption
<string> NewLine { get; } = FormattingOptions2.NewLine.ToPublicOption();
28
public static
PerLanguageOption
<IndentStyle> SmartIndent { get; } = (
PerLanguageOption
<IndentStyle>)FormattingOptions2.SmartIndent.PublicOption!;
Options\DocumentOptionSet.cs (3)
23
/// pass that information redundantly when calling <see cref="GetOption{T}(
PerLanguageOption
{T})"/>.
97
public T GetOption<T>(
PerLanguageOption
<T> option)
106
public DocumentOptionSet WithChangedOption<T>(
PerLanguageOption
<T> option, T value)
Options\OptionSet.cs (2)
59
public T GetOption<T>(
PerLanguageOption
<T> option, string? language)
65
public OptionSet WithChangedOption<T>(
PerLanguageOption
<T> option, string? language, T value)
PublicOptionFactory.cs (4)
105
public static
PerLanguageOption
<T> ToPublicOption<T>(this PerLanguageOption2<T> option)
108
return (
PerLanguageOption
<T>)option.PublicOption;
117
public static
PerLanguageOption
<CodeStyleOption<T>> ToPublicOption<T>(this PerLanguageOption2<CodeStyleOption2<T>> option)
120
return (
PerLanguageOption
<CodeStyleOption<T>>)option.PublicOption;
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);
Microsoft.CodeAnalysis.Workspaces.UnitTests (9)
Options\OptionKeyTests.cs (6)
60
var
option = new PerLanguageOption<bool>("X", "Test Name", false, storage1, storage2, storage3);
121
var
option = new PerLanguageOption<bool>("FooFeature", "BarName", false);
144
var
option1 = new PerLanguageOption<bool>("FooFeature", "BarName", defaultValue: false);
145
var
option2 = new PerLanguageOption<bool>("FooFeature", "BarName", defaultValue: true);
146
var
option3 = new PerLanguageOption<bool>("FormattingOptions", "UseTabs", FormattingOptions.UseTabs.DefaultValue);
171
var
publicOption = CodeStyleOptions.PreferIntrinsicPredefinedTypeKeywordInMemberAccess;
SolutionTests\SolutionTests.cs (1)
4261
var
option = FormattingOptions.UseTabs;
WorkspaceServiceTests\GlobalOptionServiceTests.cs (2)
152
var
optionvalid = new PerLanguageOption<bool>("Test Feature", "Test Name", false);
274
var
perLanguageOption = perLanguageOption2.ToPublicOption();