143 references to Suggestion
Microsoft.CodeAnalysis.CSharp.EditorFeatures (1)
ConvertNamespace\ConvertNamespaceCommandHandler.cs (1)
51
new(NamespaceDeclarationPreference.FileScoped, NotificationOption2.
Suggestion
);
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (8)
CodeActions\GenerateEqualsAndGetHashCodeFromMembers\GenerateEqualsAndGetHashCodeFromMembersTests.cs (6)
57
{ CSharpCodeStyleOptions.VarElsewhere, true, NotificationOption2.
Suggestion
},
58
{ CSharpCodeStyleOptions.VarWhenTypeIsApparent, true, NotificationOption2.
Suggestion
},
59
{ CSharpCodeStyleOptions.VarForBuiltInTypes, true, NotificationOption2.
Suggestion
},
65
{ CSharpCodeStyleOptions.VarElsewhere, false, NotificationOption2.
Suggestion
},
66
{ CSharpCodeStyleOptions.VarWhenTypeIsApparent, false, NotificationOption2.
Suggestion
},
67
{ CSharpCodeStyleOptions.VarForBuiltInTypes, false, NotificationOption2.
Suggestion
},
Formatting\CSharpNewDocumentFormattingServiceTests.cs (2)
300
{ CSharpCodeStyleOptions.PreferTopLevelStatements, new CodeStyleOption2<bool>(value: true, notification: NotificationOption2.
Suggestion
) }
324
{ CSharpCodeStyleOptions.PreferTopLevelStatements, new CodeStyleOption2<bool>(value: false, notification: NotificationOption2.
Suggestion
) }
Microsoft.CodeAnalysis.CSharp.Features (1)
src\Analyzers\CSharp\Analyzers\UseNameofInNullableAttribute\CSharpUseNameofInNullableAttributeDiagnosticAnalyzer.cs (1)
103
NotificationOption2.
Suggestion
,
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (113)
ConvertProgram\ConvertToProgramMainAnalyzerTests.cs (18)
169
Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.
Suggestion
} },
193
{ CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.
Suggestion
},
219
Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.
Suggestion
} },
248
Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.
Suggestion
} },
285
Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.
Suggestion
} },
311
Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.
Suggestion
} },
341
Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.
Suggestion
} },
368
Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.
Suggestion
} },
397
Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.
Suggestion
} },
423
Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.
Suggestion
} },
450
Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.
Suggestion
} },
473
Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.
Suggestion
} },
495
Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.
Suggestion
} },
528
Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.
Suggestion
} },
565
Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.
Suggestion
} },
597
Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.
Suggestion
} },
634
Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.
Suggestion
} },
669
Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.
Suggestion
} },
ConvertProgram\ConvertToProgramMainRefactoringTests.cs (2)
107
{ CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.
Suggestion
},
122
{ CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.
Suggestion
},
ConvertProgram\ConvertToTopLevelStatementsAnalyzerTests.cs (47)
280
Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.
Suggestion
} },
300
Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.
Suggestion
} },
325
Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.
Suggestion
} },
350
Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.
Suggestion
} },
372
Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.
Suggestion
} },
390
Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.
Suggestion
} },
410
Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.
Suggestion
} },
430
Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.
Suggestion
} },
454
Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.
Suggestion
} },
474
Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.
Suggestion
} },
495
Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.
Suggestion
} },
516
Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.
Suggestion
} },
543
Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.
Suggestion
} },
566
Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.
Suggestion
} },
589
Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.
Suggestion
} },
612
Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.
Suggestion
} },
635
Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.
Suggestion
} },
657
Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.
Suggestion
} },
679
Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.
Suggestion
} },
703
Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.
Suggestion
} },
727
Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.
Suggestion
} },
749
Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.
Suggestion
} },
771
Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.
Suggestion
} },
793
Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.
Suggestion
} },
813
Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.
Suggestion
} },
842
Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.
Suggestion
} },
871
Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.
Suggestion
} },
900
Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.
Suggestion
} },
929
Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.
Suggestion
} },
958
Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.
Suggestion
} },
987
Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.
Suggestion
} },
1016
Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.
Suggestion
} },
1045
Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.
Suggestion
} },
1076
Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.
Suggestion
} },
1102
Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.
Suggestion
} },
1133
Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.
Suggestion
} },
1172
Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.
Suggestion
} },
1211
Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.
Suggestion
} },
1254
Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.
Suggestion
} },
1283
Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.
Suggestion
} },
1326
Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.
Suggestion
} },
1367
Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.
Suggestion
} },
1411
Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.
Suggestion
} },
1453
Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.
Suggestion
} },
1485
Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.
Suggestion
} },
1516
Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.
Suggestion
} },
1563
Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.
Suggestion
} },
ConvertProgram\ConvertToTopLevelStatementsRefactoringTests.cs (9)
77
{ CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.
Suggestion
},
97
{ CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.
Suggestion
},
118
{ CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.
Suggestion
},
144
{ CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.
Suggestion
},
165
{ CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.
Suggestion
},
248
{ CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.
Suggestion
},
292
{ CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.
Suggestion
},
332
{ CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.
Suggestion
},
382
{ CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.
Suggestion
},
ConvertTupleToStruct\ConvertTupleToStructTests.cs (3)
35
{ CSharpCodeStyleOptions.VarElsewhere, true, NotificationOption2.
Suggestion
},
36
{ CSharpCodeStyleOptions.VarWhenTypeIsApparent, true, NotificationOption2.
Suggestion
},
37
{ CSharpCodeStyleOptions.VarForBuiltInTypes, true, NotificationOption2.
Suggestion
},
ExtractMethod\ExtractMethodCodeRefactoringTests.cs (3)
52
private static readonly CodeStyleOption2<bool> onWithInfo = new(true, NotificationOption2.
Suggestion
);
53
private static readonly CodeStyleOption2<bool> offWithInfo = new(false, NotificationOption2.
Suggestion
);
83
{ CSharpCodeStyleOptions.PreferBraces, new CodeStyleOption2<PreferBracesPreference>(PreferBracesPreference.None, NotificationOption2.
Suggestion
) }
GenerateVariable\GenerateVariableTests.cs (1)
37
private readonly CodeStyleOption2<bool> onWithInfo = new(true, NotificationOption2.
Suggestion
);
IntroduceVariable\IntroduceLocalForExpressionTests.cs (2)
21
private static readonly CodeStyleOption2<bool> onWithInfo = new(true, NotificationOption2.
Suggestion
);
22
private static readonly CodeStyleOption2<bool> offWithInfo = new(false, NotificationOption2.
Suggestion
);
IntroduceVariable\IntroduceVariableTests.cs (1)
31
private readonly CodeStyleOption2<bool> onWithInfo = new CodeStyleOption2<bool>(true, NotificationOption2.
Suggestion
);
PreferFrameworkType\PreferFrameworkTypeTests.cs (6)
27
private readonly CodeStyleOption2<bool> onWithInfo = new(true, NotificationOption2.
Suggestion
);
28
private readonly CodeStyleOption2<bool> offWithInfo = new(false, NotificationOption2.
Suggestion
);
33
{ CodeStyleOptions2.PreferIntrinsicPredefinedTypeKeywordInDeclaration, true, NotificationOption2.
Suggestion
},
40
{ CodeStyleOptions2.PreferIntrinsicPredefinedTypeKeywordInDeclaration, false, NotificationOption2.
Suggestion
},
47
{ CodeStyleOptions2.PreferIntrinsicPredefinedTypeKeywordInDeclaration, false, NotificationOption2.
Suggestion
},
54
{ CodeStyleOptions2.PreferIntrinsicPredefinedTypeKeywordInDeclaration, true, NotificationOption2.
Suggestion
},
SimplifyThisOrMe\SimplifyThisOrMeTests.cs (2)
360
{ CodeStyleOptions2.QualifyPropertyAccess, false, NotificationOption2.
Suggestion
},
361
{ CodeStyleOptions2.QualifyFieldAccess, true, NotificationOption2.
Suggestion
},
SimplifyTypeNames\SimplifyTypeNamesTests.cs (1)
6921
private readonly CodeStyleOption2<bool> onWithInfo = new(true, NotificationOption2.
Suggestion
);
src\Analyzers\CSharp\Tests\ConvertNamespace\ConvertToBlockScopedNamespaceAnalyzerTests.cs (1)
67
{ CSharpCodeStyleOptions.NamespaceDeclarations, NamespaceDeclarationPreference.BlockScoped, NotificationOption2.
Suggestion
}
src\Analyzers\CSharp\Tests\ConvertNamespace\ConvertToFileScopedNamespaceAnalyzerTests.cs (1)
87
{ CSharpCodeStyleOptions.NamespaceDeclarations, NamespaceDeclarationPreference.FileScoped, NotificationOption2.
Suggestion
}
src\Analyzers\CSharp\Tests\InlineDeclaration\CSharpInlineDeclarationTests.cs (1)
30
private readonly CodeStyleOption2<bool> s_offWithInfo = new(false, NotificationOption2.
Suggestion
);
src\Analyzers\CSharp\Tests\NewLines\EmbeddedStatementPlacement\EmbeddedStatementPlacementTests.cs (1)
77
Options = { { CSharpCodeStyleOptions.AllowEmbeddedStatementsOnSameLine, true, NotificationOption2.
Suggestion
} }
src\Analyzers\CSharp\Tests\QualifyMemberAccess\QualifyMemberAccessTests.cs (1)
1438
CodeStyleOptions2.QualifyPropertyAccess, NotificationOption2.
Suggestion
);
src\Analyzers\CSharp\Tests\QualifyMemberAccess\QualifyMemberAccessTests_FixAllTests.cs (1)
93
options: Option(CodeStyleOptions2.QualifyPropertyAccess, true, NotificationOption2.
Suggestion
));
src\Analyzers\CSharp\Tests\RemoveUnusedParametersAndValues\RemoveUnusedParametersTests.cs (3)
43
new CodeStyleOption2<UnusedParametersPreference>(UnusedParametersPreference.NonPublicMethods, NotificationOption2.
Suggestion
));
1383
new CodeStyleOption2<UnusedParametersPreference>(default, NotificationOption2.
Suggestion
));
1414
new CodeStyleOption2<UnusedParametersPreference>((UnusedParametersPreference)2, NotificationOption2.
Suggestion
));
src\Analyzers\CSharp\Tests\RemoveUnusedParametersAndValues\RemoveUnusedValueAssignmentTests.cs (2)
34
new CodeStyleOption2<UnusedValuePreference>(UnusedValuePreference.DiscardVariable, NotificationOption2.
Suggestion
));
38
new CodeStyleOption2<UnusedValuePreference>(UnusedValuePreference.UnusedLocalVariable, NotificationOption2.
Suggestion
));
src\Analyzers\CSharp\Tests\UseExpressionBody\UseExpressionBodyForMethodsAnalyzerTests.cs (1)
76
Assert.Equal(NotificationOption2.
Suggestion
.WithIsExplicitlySpecified(true), option.Notification);
src\Analyzers\CSharp\Tests\UseImplicitOrExplicitType\UseExplicitTypeTests.cs (2)
28
private readonly CodeStyleOption2<bool> onWithInfo = new(true, NotificationOption2.
Suggestion
);
29
private readonly CodeStyleOption2<bool> offWithInfo = new(false, NotificationOption2.
Suggestion
);
src\Analyzers\CSharp\Tests\UseImplicitOrExplicitType\UseImplicitTypeTests.cs (2)
29
private static readonly CodeStyleOption2<bool> onWithInfo = new(true, NotificationOption2.
Suggestion
);
30
private static readonly CodeStyleOption2<bool> offWithInfo = new(false, NotificationOption2.
Suggestion
);
src\Analyzers\CSharp\Tests\UseVarTestExtensions.cs (2)
23
private static readonly CodeStyleOption2<bool> onWithInfo = new CodeStyleOption2<bool>(true, NotificationOption2.
Suggestion
);
24
private static readonly CodeStyleOption2<bool> offWithInfo = new CodeStyleOption2<bool>(false, NotificationOption2.
Suggestion
);
Microsoft.CodeAnalysis.CSharp.Workspaces (3)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\CodeStyle\CSharpCodeStyleOptions.cs (3)
99
new(ExpressionBodyPreference.Never, NotificationOption2.
Suggestion
);
105
new(ExpressionBodyPreference.WhenPossible, NotificationOption2.
Suggestion
);
239
defaultValue: new CodeStyleOption2<UnusedValuePreference>(UnusedValuePreference.DiscardVariable, NotificationOption2.
Suggestion
),
Microsoft.CodeAnalysis.EditorFeatures (1)
EditorConfigSettings\Data\CodeStyleSetting.cs (1)
39
ReportDiagnostic.Info => NotificationOption2.
Suggestion
,
Microsoft.CodeAnalysis.Workspaces (15)
CodeStyle\NotificationOption.cs (2)
48
/// <inheritdoc cref="NotificationOption2.
Suggestion
"/>
49
public static readonly NotificationOption Suggestion = new(NotificationOption2.
Suggestion
);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleHelpers.cs (1)
109
case EditorConfigSeverityStrings.Suggestion: notification = NotificationOption2.
Suggestion
; return true;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOption2`1.cs (3)
43
public static readonly CodeStyleOption2<bool> TrueWithSuggestionEnforcement = new(value: true, notification: NotificationOption2.
Suggestion
);
44
public static readonly CodeStyleOption2<bool> FalseWithSuggestionEnforcement = new(value: false, notification: NotificationOption2.
Suggestion
);
193
DiagnosticSeverity.Info => NotificationOption2.
Suggestion
,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOptions2.cs (4)
97
defaultValue: new CodeStyleOption2<CollectionExpressionPreference>(CollectionExpressionPreference.WhenTypesLooselyMatch, NotificationOption2.
Suggestion
),
180
defaultValue: new CodeStyleOption2<UnusedParametersPreference>(UnusedParametersPreference.AllMethods, NotificationOption2.
Suggestion
),
307
defaultValue: new CodeStyleOption2<ForEachExplicitCastInSourcePreference>(ForEachExplicitCastInSourcePreference.WhenStronglyTyped, NotificationOption2.
Suggestion
),
331
defaultValue: new CodeStyleOption2<bool>(value: true, notification: NotificationOption2.
Suggestion
));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\NotificationOption2.cs (2)
51
ReportDiagnostic.Info =>
Suggestion
,
62
DiagnosticSeverity.Info =>
Suggestion
,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\VisualBasic\VisualBasicCodeStyleOptions.cs (1)
52
defaultValue: new CodeStyleOption2<UnusedValuePreference>(UnusedValuePreference.UnusedLocalVariable, NotificationOption2.
Suggestion
),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticSeverityExtensions.cs (1)
17
DiagnosticSeverity.Info => NotificationOption2.
Suggestion
,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ReportDiagnosticExtensions.cs (1)
32
ReportDiagnostic.Info => NotificationOption2.
Suggestion
,
Microsoft.CodeAnalysis.Workspaces.UnitTests (1)
Options\OptionKeyTests.cs (1)
172
Assert.Equal(new CodeStyleOption2<bool>(true, NotificationOption2.
Suggestion
.WithIsExplicitlySpecified(true)), result);