143 references to Suggestion
Microsoft.CodeAnalysis.CSharp.EditorFeatures (1)
ConvertNamespace\ConvertNamespaceCommandHandler.cs (1)
51new(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)
103NotificationOption2.Suggestion,
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (113)
ConvertProgram\ConvertToProgramMainAnalyzerTests.cs (18)
169Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.Suggestion } }, 193{ CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.Suggestion }, 219Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.Suggestion } }, 248Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.Suggestion } }, 285Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.Suggestion } }, 311Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.Suggestion } }, 341Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.Suggestion } }, 368Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.Suggestion } }, 397Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.Suggestion } }, 423Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.Suggestion } }, 450Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.Suggestion } }, 473Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.Suggestion } }, 495Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.Suggestion } }, 528Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.Suggestion } }, 565Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.Suggestion } }, 597Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.Suggestion } }, 634Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.Suggestion } }, 669Options = { { 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)
280Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 300Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 325Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 350Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 372Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 390Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 410Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 430Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 454Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 474Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 495Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 516Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 543Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 566Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 589Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 612Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 635Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 657Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 679Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 703Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 727Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 749Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 771Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 793Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 813Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 842Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 871Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 900Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 929Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 958Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 987Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 1016Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 1045Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 1076Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 1102Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 1133Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 1172Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 1211Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 1254Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 1283Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 1326Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 1367Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 1411Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 1453Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 1485Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 1516Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 1563Options = { { 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)
52private static readonly CodeStyleOption2<bool> onWithInfo = new(true, NotificationOption2.Suggestion); 53private static readonly CodeStyleOption2<bool> offWithInfo = new(false, NotificationOption2.Suggestion); 83{ CSharpCodeStyleOptions.PreferBraces, new CodeStyleOption2<PreferBracesPreference>(PreferBracesPreference.None, NotificationOption2.Suggestion) }
GenerateVariable\GenerateVariableTests.cs (1)
37private readonly CodeStyleOption2<bool> onWithInfo = new(true, NotificationOption2.Suggestion);
IntroduceVariable\IntroduceLocalForExpressionTests.cs (2)
21private static readonly CodeStyleOption2<bool> onWithInfo = new(true, NotificationOption2.Suggestion); 22private static readonly CodeStyleOption2<bool> offWithInfo = new(false, NotificationOption2.Suggestion);
IntroduceVariable\IntroduceVariableTests.cs (1)
31private readonly CodeStyleOption2<bool> onWithInfo = new CodeStyleOption2<bool>(true, NotificationOption2.Suggestion);
PreferFrameworkType\PreferFrameworkTypeTests.cs (6)
27private readonly CodeStyleOption2<bool> onWithInfo = new(true, NotificationOption2.Suggestion); 28private 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)
6921private 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)
30private readonly CodeStyleOption2<bool> s_offWithInfo = new(false, NotificationOption2.Suggestion);
src\Analyzers\CSharp\Tests\NewLines\EmbeddedStatementPlacement\EmbeddedStatementPlacementTests.cs (1)
77Options = { { CSharpCodeStyleOptions.AllowEmbeddedStatementsOnSameLine, true, NotificationOption2.Suggestion } }
src\Analyzers\CSharp\Tests\QualifyMemberAccess\QualifyMemberAccessTests.cs (1)
1438CodeStyleOptions2.QualifyPropertyAccess, NotificationOption2.Suggestion);
src\Analyzers\CSharp\Tests\QualifyMemberAccess\QualifyMemberAccessTests_FixAllTests.cs (1)
93options: Option(CodeStyleOptions2.QualifyPropertyAccess, true, NotificationOption2.Suggestion));
src\Analyzers\CSharp\Tests\RemoveUnusedParametersAndValues\RemoveUnusedParametersTests.cs (3)
43new CodeStyleOption2<UnusedParametersPreference>(UnusedParametersPreference.NonPublicMethods, NotificationOption2.Suggestion)); 1383new CodeStyleOption2<UnusedParametersPreference>(default, NotificationOption2.Suggestion)); 1414new CodeStyleOption2<UnusedParametersPreference>((UnusedParametersPreference)2, NotificationOption2.Suggestion));
src\Analyzers\CSharp\Tests\RemoveUnusedParametersAndValues\RemoveUnusedValueAssignmentTests.cs (2)
34new CodeStyleOption2<UnusedValuePreference>(UnusedValuePreference.DiscardVariable, NotificationOption2.Suggestion)); 38new CodeStyleOption2<UnusedValuePreference>(UnusedValuePreference.UnusedLocalVariable, NotificationOption2.Suggestion));
src\Analyzers\CSharp\Tests\UseExpressionBody\UseExpressionBodyForMethodsAnalyzerTests.cs (1)
76Assert.Equal(NotificationOption2.Suggestion.WithIsExplicitlySpecified(true), option.Notification);
src\Analyzers\CSharp\Tests\UseImplicitOrExplicitType\UseExplicitTypeTests.cs (2)
28private readonly CodeStyleOption2<bool> onWithInfo = new(true, NotificationOption2.Suggestion); 29private readonly CodeStyleOption2<bool> offWithInfo = new(false, NotificationOption2.Suggestion);
src\Analyzers\CSharp\Tests\UseImplicitOrExplicitType\UseImplicitTypeTests.cs (2)
29private static readonly CodeStyleOption2<bool> onWithInfo = new(true, NotificationOption2.Suggestion); 30private static readonly CodeStyleOption2<bool> offWithInfo = new(false, NotificationOption2.Suggestion);
src\Analyzers\CSharp\Tests\UseVarTestExtensions.cs (2)
23private static readonly CodeStyleOption2<bool> onWithInfo = new CodeStyleOption2<bool>(true, NotificationOption2.Suggestion); 24private 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)
99new(ExpressionBodyPreference.Never, NotificationOption2.Suggestion); 105new(ExpressionBodyPreference.WhenPossible, NotificationOption2.Suggestion); 239defaultValue: new CodeStyleOption2<UnusedValuePreference>(UnusedValuePreference.DiscardVariable, NotificationOption2.Suggestion),
Microsoft.CodeAnalysis.EditorFeatures (1)
EditorConfigSettings\Data\CodeStyleSetting.cs (1)
39ReportDiagnostic.Info => NotificationOption2.Suggestion,
Microsoft.CodeAnalysis.Workspaces (15)
CodeStyle\NotificationOption.cs (2)
48/// <inheritdoc cref="NotificationOption2.Suggestion"/> 49public static readonly NotificationOption Suggestion = new(NotificationOption2.Suggestion);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleHelpers.cs (1)
109case EditorConfigSeverityStrings.Suggestion: notification = NotificationOption2.Suggestion; return true;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOption2`1.cs (3)
43public static readonly CodeStyleOption2<bool> TrueWithSuggestionEnforcement = new(value: true, notification: NotificationOption2.Suggestion); 44public static readonly CodeStyleOption2<bool> FalseWithSuggestionEnforcement = new(value: false, notification: NotificationOption2.Suggestion); 193DiagnosticSeverity.Info => NotificationOption2.Suggestion,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOptions2.cs (4)
97defaultValue: new CodeStyleOption2<CollectionExpressionPreference>(CollectionExpressionPreference.WhenTypesLooselyMatch, NotificationOption2.Suggestion), 180defaultValue: new CodeStyleOption2<UnusedParametersPreference>(UnusedParametersPreference.AllMethods, NotificationOption2.Suggestion), 307defaultValue: new CodeStyleOption2<ForEachExplicitCastInSourcePreference>(ForEachExplicitCastInSourcePreference.WhenStronglyTyped, NotificationOption2.Suggestion), 331defaultValue: new CodeStyleOption2<bool>(value: true, notification: NotificationOption2.Suggestion));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\NotificationOption2.cs (2)
51ReportDiagnostic.Info => Suggestion, 62DiagnosticSeverity.Info => Suggestion,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\VisualBasic\VisualBasicCodeStyleOptions.cs (1)
52defaultValue: new CodeStyleOption2<UnusedValuePreference>(UnusedValuePreference.UnusedLocalVariable, NotificationOption2.Suggestion),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticSeverityExtensions.cs (1)
17DiagnosticSeverity.Info => NotificationOption2.Suggestion,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ReportDiagnosticExtensions.cs (1)
32ReportDiagnostic.Info => NotificationOption2.Suggestion,
Microsoft.CodeAnalysis.Workspaces.UnitTests (1)
Options\OptionKeyTests.cs (1)
172Assert.Equal(new CodeStyleOption2<bool>(true, NotificationOption2.Suggestion.WithIsExplicitlySpecified(true)), result);