81 references to CodeStyleOptions2
Microsoft.CodeAnalysis.CodeStyle (81)
src\Analyzers\Core\Analyzers\AddAccessibilityModifiers\AbstractAddAccessibilityModifiersDiagnosticAnalyzer.cs (1)
15
CodeStyleOptions2
.AccessibilityModifiersRequired,
src\Analyzers\Core\Analyzers\AnalyzerOptionsProvider.cs (36)
21
public CodeStyleOption2<bool> QualifyFieldAccess => GetOption(
CodeStyleOptions2
.QualifyFieldAccess);
22
public CodeStyleOption2<bool> QualifyPropertyAccess => GetOption(
CodeStyleOptions2
.QualifyPropertyAccess);
23
public CodeStyleOption2<bool> QualifyMethodAccess => GetOption(
CodeStyleOptions2
.QualifyMethodAccess);
24
public CodeStyleOption2<bool> QualifyEventAccess => GetOption(
CodeStyleOptions2
.QualifyEventAccess);
25
public CodeStyleOption2<bool> PreferPredefinedTypeKeywordInMemberAccess => GetOption(
CodeStyleOptions2
.PreferIntrinsicPredefinedTypeKeywordInMemberAccess);
26
public CodeStyleOption2<bool> PreferPredefinedTypeKeywordInDeclaration => GetOption(
CodeStyleOptions2
.PreferIntrinsicPredefinedTypeKeywordInDeclaration);
42
public CodeStyleOption2<bool> PreferObjectInitializer => GetOption(
CodeStyleOptions2
.PreferObjectInitializer);
43
public CodeStyleOption2<CollectionExpressionPreference> PreferCollectionExpression => GetOption(
CodeStyleOptions2
.PreferCollectionExpression);
44
public CodeStyleOption2<bool> PreferCollectionInitializer => GetOption(
CodeStyleOptions2
.PreferCollectionInitializer);
45
public CodeStyleOption2<bool> PreferSimplifiedBooleanExpressions => GetOption(
CodeStyleOptions2
.PreferSimplifiedBooleanExpressions);
46
public OperatorPlacementWhenWrappingPreference OperatorPlacementWhenWrapping => GetOption(
CodeStyleOptions2
.OperatorPlacementWhenWrapping);
47
public CodeStyleOption2<bool> PreferCoalesceExpression => GetOption(
CodeStyleOptions2
.PreferCoalesceExpression);
48
public CodeStyleOption2<bool> PreferNullPropagation => GetOption(
CodeStyleOptions2
.PreferNullPropagation);
49
public CodeStyleOption2<bool> PreferExplicitTupleNames => GetOption(
CodeStyleOptions2
.PreferExplicitTupleNames);
50
public CodeStyleOption2<bool> PreferAutoProperties => GetOption(
CodeStyleOptions2
.PreferAutoProperties);
51
public CodeStyleOption2<bool> PreferInferredTupleNames => GetOption(
CodeStyleOptions2
.PreferInferredTupleNames);
52
public CodeStyleOption2<bool> PreferInferredAnonymousTypeMemberNames => GetOption(
CodeStyleOptions2
.PreferInferredAnonymousTypeMemberNames);
53
public CodeStyleOption2<bool> PreferIsNullCheckOverReferenceEqualityMethod => GetOption(
CodeStyleOptions2
.PreferIsNullCheckOverReferenceEqualityMethod);
54
public CodeStyleOption2<bool> PreferConditionalExpressionOverAssignment => GetOption(
CodeStyleOptions2
.PreferConditionalExpressionOverAssignment);
55
public CodeStyleOption2<bool> PreferConditionalExpressionOverReturn => GetOption(
CodeStyleOptions2
.PreferConditionalExpressionOverReturn);
56
public CodeStyleOption2<bool> PreferCompoundAssignment => GetOption(
CodeStyleOptions2
.PreferCompoundAssignment);
57
public CodeStyleOption2<bool> PreferSimplifiedInterpolation => GetOption(
CodeStyleOptions2
.PreferSimplifiedInterpolation);
58
public CodeStyleOption2<bool> PreferSystemHashCode => GetOption(
CodeStyleOptions2
.PreferSystemHashCode);
59
public CodeStyleOption2<UnusedParametersPreference> UnusedParameters => GetOption(
CodeStyleOptions2
.UnusedParameters);
60
public CodeStyleOption2<AccessibilityModifiersRequired> RequireAccessibilityModifiers => GetOption(
CodeStyleOptions2
.AccessibilityModifiersRequired);
61
public CodeStyleOption2<bool> PreferReadonly => GetOption(
CodeStyleOptions2
.PreferReadonly);
62
public CodeStyleOption2<ParenthesesPreference> ArithmeticBinaryParentheses => GetOption(
CodeStyleOptions2
.ArithmeticBinaryParentheses);
63
public CodeStyleOption2<ParenthesesPreference> OtherBinaryParentheses => GetOption(
CodeStyleOptions2
.OtherBinaryParentheses);
64
public CodeStyleOption2<ParenthesesPreference> RelationalBinaryParentheses => GetOption(
CodeStyleOptions2
.RelationalBinaryParentheses);
65
public CodeStyleOption2<ParenthesesPreference> OtherParentheses => GetOption(
CodeStyleOptions2
.OtherParentheses);
66
public CodeStyleOption2<ForEachExplicitCastInSourcePreference> ForEachExplicitCastInSource => GetOption(
CodeStyleOptions2
.ForEachExplicitCastInSource);
67
public CodeStyleOption2<bool> PreferNamespaceAndFolderMatchStructure => GetOption(
CodeStyleOptions2
.PreferNamespaceAndFolderMatchStructure);
68
public CodeStyleOption2<bool> AllowMultipleBlankLines => GetOption(
CodeStyleOptions2
.AllowMultipleBlankLines);
69
public CodeStyleOption2<bool> AllowStatementImmediatelyAfterBlock => GetOption(
CodeStyleOptions2
.AllowStatementImmediatelyAfterBlock);
70
public string RemoveUnnecessarySuppressionExclusions => GetOption(
CodeStyleOptions2
.RemoveUnnecessarySuppressionExclusions);
72
public string FileHeaderTemplate => GetOption(
CodeStyleOptions2
.FileHeaderTemplate);
src\Analyzers\Core\Analyzers\FileHeaders\AbstractFileHeaderDiagnosticAnalyzer.cs (2)
27
(s_invalidHeaderDescriptor,
CodeStyleOptions2
.FileHeaderTemplate),
28
(s_missingHeaderDescriptor,
CodeStyleOptions2
.FileHeaderTemplate)
src\Analyzers\Core\Analyzers\ForEachCast\AbstractForEachCastDiagnosticAnalyzer.cs (1)
33
CodeStyleOptions2
.ForEachExplicitCastInSource,
src\Analyzers\Core\Analyzers\MakeFieldReadonly\AbstractMakeFieldReadonlyDiagnosticAnalyzer.cs (1)
21
CodeStyleOptions2
.PreferReadonly,
src\Analyzers\Core\Analyzers\MatchFolderAndNamespace\AbstractMatchFolderAndNamespaceDiagnosticAnalyzer.cs (1)
37
CodeStyleOptions2
.PreferNamespaceAndFolderMatchStructure,
src\Analyzers\Core\Analyzers\NewLines\ConsecutiveStatementPlacement\AbstractConsecutiveStatementPlacementDiagnosticAnalyzer.cs (1)
24
CodeStyleOptions2
.AllowStatementImmediatelyAfterBlock,
src\Analyzers\Core\Analyzers\NewLines\MultipleBlankLines\AbstractMultipleBlankLinesDiagnosticAnalyzer.cs (1)
22
CodeStyleOptions2
.AllowMultipleBlankLines,
src\Analyzers\Core\Analyzers\ParenthesesDiagnosticAnalyzersHelper.cs (4)
18
CodeStyleOptions2
.ArithmeticBinaryParentheses,
19
CodeStyleOptions2
.RelationalBinaryParentheses,
20
CodeStyleOptions2
.OtherBinaryParentheses,
21
CodeStyleOptions2
.OtherParentheses,
src\Analyzers\Core\Analyzers\QualifyMemberAccess\AbstractQualifyMemberAccessDiagnosticAnalyzer.cs (4)
29
CodeStyleOptions2
.QualifyFieldAccess,
30
CodeStyleOptions2
.QualifyPropertyAccess,
31
CodeStyleOptions2
.QualifyMethodAccess,
32
CodeStyleOptions2
.QualifyEventAccess,
src\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\AbstractRemoveUnnecessaryPragmaSuppressionsDiagnosticAnalyzer.cs (1)
361
if (userExclusions ==
CodeStyleOptions2
.RemoveUnnecessarySuppressionExclusions.DefaultValue)
src\Analyzers\Core\Analyzers\RemoveUnusedParametersAndValues\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.cs (2)
54
/// This diagnostic configuration is controlled by <see cref="
CodeStyleOptions2
.UnusedParameters"/> option.
103
(s_unusedParameterRule,
CodeStyleOptions2
.UnusedParameters)
src\Analyzers\Core\Analyzers\SimplifyBooleanExpression\AbstractSimplifyConditionalDiagnosticAnalyzer.cs (1)
44
CodeStyleOptions2
.PreferSimplifiedBooleanExpressions,
src\Analyzers\Core\Analyzers\SimplifyInterpolation\AbstractSimplifyInterpolationDiagnosticAnalyzer.cs (1)
23
CodeStyleOptions2
.PreferSimplifiedInterpolation,
src\Analyzers\Core\Analyzers\SimplifyTypeNames\SimplifyTypeNamesDiagnosticAnalyzerBase.cs (3)
70
CodeStyleOptions2
.PreferIntrinsicPredefinedTypeKeywordInDeclaration,
71
CodeStyleOptions2
.PreferIntrinsicPredefinedTypeKeywordInMemberAccess,
165
builder["OptionName"] = nameof(
CodeStyleOptions2
.PreferIntrinsicPredefinedTypeKeywordInMemberAccess); // TODO: need the actual one
src\Analyzers\Core\Analyzers\UseAutoProperty\AbstractUseAutoPropertyAnalyzer.cs (1)
56
CodeStyleOptions2
.PreferAutoProperties,
src\Analyzers\Core\Analyzers\UseCoalesceExpression\AbstractUseCoalesceExpressionForIfNullCheckDiagnosticAnalyzer.cs (1)
21
CodeStyleOptions2
.PreferCoalesceExpression,
src\Analyzers\Core\Analyzers\UseCoalesceExpression\AbstractUseCoalesceExpressionForNullableTernaryConditionalCheckDiagnosticAnalyzer.cs (1)
33
CodeStyleOptions2
.PreferCoalesceExpression,
src\Analyzers\Core\Analyzers\UseCoalesceExpression\AbstractUseCoalesceExpressionForTernaryConditionalCheckDiagnosticAnalyzer.cs (1)
28
CodeStyleOptions2
.PreferCoalesceExpression,
src\Analyzers\Core\Analyzers\UseCollectionInitializer\AbstractUseCollectionInitializerDiagnosticAnalyzer.cs (1)
73
(s_descriptor,
CodeStyleOptions2
.PreferCollectionInitializer)
src\Analyzers\Core\Analyzers\UseCompoundAssignment\AbstractUseCompoundAssignmentDiagnosticAnalyzer.cs (1)
40
CodeStyleOptions2
.PreferCompoundAssignment,
src\Analyzers\Core\Analyzers\UseConditionalExpression\ForAssignment\AbstractUseConditionalExpressionForAssignmentDiagnosticAnalyzer.cs (1)
21
CodeStyleOptions2
.PreferConditionalExpressionOverAssignment)
src\Analyzers\Core\Analyzers\UseConditionalExpression\ForReturn\AbstractUseConditionalExpressionForReturnDiagnosticAnalyzer.cs (1)
21
CodeStyleOptions2
.PreferConditionalExpressionOverReturn)
src\Analyzers\Core\Analyzers\UseExplicitTupleName\UseExplicitTupleNameDiagnosticAnalyzer.cs (1)
22
CodeStyleOptions2
.PreferExplicitTupleNames,
src\Analyzers\Core\Analyzers\UseInferredMemberName\AbstractUseInferredMemberNameDiagnosticAnalyzer.cs (2)
17
options: [
CodeStyleOptions2
.PreferInferredAnonymousTypeMemberNames,
CodeStyleOptions2
.PreferInferredTupleNames],
src\Analyzers\Core\Analyzers\UseIsNullCheck\AbstractUseIsNullForReferenceEqualsDiagnosticAnalyzer.cs (1)
22
CodeStyleOptions2
.PreferIsNullCheckOverReferenceEqualityMethod,
src\Analyzers\Core\Analyzers\UseNullPropagation\AbstractUseNullPropagationDiagnosticAnalyzer.cs (1)
67
CodeStyleOptions2
.PreferNullPropagation,
src\Analyzers\Core\Analyzers\UseObjectInitializer\AbstractUseObjectInitializerDiagnosticAnalyzer.cs (1)
58
(s_descriptor,
CodeStyleOptions2
.PreferObjectInitializer)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\SyntaxFormattingOptions.cs (1)
33
AccessibilityModifiersRequired = options.GetOptionValue(
CodeStyleOptions2
.AccessibilityModifiersRequired, language);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Simplification\SimplifierOptions.cs (6)
34
QualifyFieldAccess = options.GetOption(
CodeStyleOptions2
.QualifyFieldAccess, language);
35
QualifyPropertyAccess = options.GetOption(
CodeStyleOptions2
.QualifyPropertyAccess, language);
36
QualifyMethodAccess = options.GetOption(
CodeStyleOptions2
.QualifyMethodAccess, language);
37
QualifyEventAccess = options.GetOption(
CodeStyleOptions2
.QualifyEventAccess, language);
38
PreferPredefinedTypeKeywordInMemberAccess = options.GetOption(
CodeStyleOptions2
.PreferIntrinsicPredefinedTypeKeywordInMemberAccess, language);
39
PreferPredefinedTypeKeywordInDeclaration = options.GetOption(
CodeStyleOptions2
.PreferIntrinsicPredefinedTypeKeywordInDeclaration, language);