29 references to WarningAnnotation
Microsoft.CodeAnalysis.CodeStyle.Fixes (3)
src\Analyzers\Core\CodeFixes\UseCoalesceExpression\UseCoalesceExpressionForNullableTernaryConditionalCheckCodeFixProvider.cs (1)
71WarningAnnotation.Create(AnalyzersResources.Changes_to_expression_trees_may_result_in_behavior_changes_at_runtime));
src\Analyzers\Core\CodeFixes\UseCoalesceExpression\UseCoalesceExpressionForTernaryConditionalCheckCodeFixProvider.cs (1)
85WarningAnnotation.Create(AnalyzersResources.Changes_to_expression_trees_may_result_in_behavior_changes_at_runtime));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\MoveDeclarationNearReference\AbstractMoveDeclarationNearReferenceService.cs (1)
87? WarningAnnotation.Create(WorkspaceExtensionsResources.Warning_colon_Declaration_changes_scope_and_may_change_meaning)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (2)
src\Analyzers\CSharp\CodeFixes\MakeLocalFunctionStatic\MakeLocalFunctionStaticCodeFixHelper.cs (1)
192var annotation = WarningAnnotation.Create(CSharpCodeFixesResources.Warning_colon_Adding_parameters_to_local_function_declaration_may_produce_invalid_code);
src\Analyzers\CSharp\CodeFixes\MisplacedUsingDirectives\MisplacedUsingDirectivesCodeFixProvider.cs (1)
44private static readonly SyntaxAnnotation s_warningAnnotation = WarningAnnotation.Create(
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (3)
CodeActions\SyncNamespace\CSharpSyncNamespaceTestsBase.cs (3)
178annotations = n.AsNode().GetAnnotations(WarningAnnotation.Kind); 182annotations = n.AsToken().GetAnnotations(WarningAnnotation.Kind); 186WarningAnnotation.GetDescription(annotation) == FeaturesResources.Warning_colon_changing_namespace_may_produce_invalid_code_and_change_code_meaning);
Microsoft.CodeAnalysis.CSharp.Features (6)
CodeRefactorings\InlineTemporary\InlineTemporaryCodeRefactoringProvider.cs (2)
196WarningAnnotation.Create(CSharpFeaturesResources.Warning_Inlining_temporary_into_conditional_method_call)); 204WarningAnnotation.Create(CSharpFeaturesResources.Warning_Inlining_temporary_variable_may_change_code_meaning));
Copilot\CSharpCopilotCodeFixProvider.cs (1)
37= CodeActions.WarningAnnotation.Create(
ReplaceMethodWithProperty\CSharpReplaceMethodWithPropertyService.cs (1)
129nameToken = nameToken.WithAdditionalAnnotations(WarningAnnotation.Create(warning));
src\Analyzers\CSharp\CodeFixes\MakeLocalFunctionStatic\MakeLocalFunctionStaticCodeFixHelper.cs (1)
192var annotation = WarningAnnotation.Create(CSharpCodeFixesResources.Warning_colon_Adding_parameters_to_local_function_declaration_may_produce_invalid_code);
src\Analyzers\CSharp\CodeFixes\MisplacedUsingDirectives\MisplacedUsingDirectivesCodeFixProvider.cs (1)
44private static readonly SyntaxAnnotation s_warningAnnotation = WarningAnnotation.Create(
Microsoft.CodeAnalysis.EditorFeatures (3)
Preview\AbstractPreviewFactoryService.cs (3)
450var warningNodes = newRoot.GetAnnotatedNodesAndTokens(WarningAnnotation.Kind); 452var warningDescriptions = warningNodes.SelectMany(n => n.GetAnnotations(WarningAnnotation.Kind)) 453.Select(a => $"⚠ {WarningAnnotation.GetDescription(a)}")
Microsoft.CodeAnalysis.Features (7)
CodeRefactorings\SyncNamespace\AbstractChangeNamespaceService.cs (1)
74= CodeActions.WarningAnnotation.Create(
ConvertForEachToFor\AbstractConvertForEachToForCodeRefactoringProvider.cs (1)
57=> WarningAnnotation.Create(FeaturesResources.Warning_colon_semantics_may_change_when_converting_statement);
ConvertForToForEach\AbstractConvertForToForEachCodeRefactoringProvider.cs (3)
452WarningAnnotation.Create(FeaturesResources.Warning_colon_Iteration_variable_crossed_function_boundary))); 484WarningAnnotation.Create(FeaturesResources.Warning_colon_Collection_was_modified_during_iteration)); 490WarningAnnotation.Create(FeaturesResources.Warning_colon_Iteration_variable_crossed_function_boundary));
src\Analyzers\Core\CodeFixes\UseCoalesceExpression\UseCoalesceExpressionForNullableTernaryConditionalCheckCodeFixProvider.cs (1)
71WarningAnnotation.Create(AnalyzersResources.Changes_to_expression_trees_may_result_in_behavior_changes_at_runtime));
src\Analyzers\Core\CodeFixes\UseCoalesceExpression\UseCoalesceExpressionForTernaryConditionalCheckCodeFixProvider.cs (1)
85WarningAnnotation.Create(AnalyzersResources.Changes_to_expression_trees_may_result_in_behavior_changes_at_runtime));
Microsoft.CodeAnalysis.VisualBasic.Features (1)
ReplaceMethodWithProperty\VisualBasicReplaceMethodWithPropertyService.vb (1)
77propertyNameToken = propertyNameToken.WithAdditionalAnnotations(WarningAnnotation.Create(warning))
Microsoft.CodeAnalysis.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\MoveDeclarationNearReference\AbstractMoveDeclarationNearReferenceService.cs (1)
87? WarningAnnotation.Create(WorkspaceExtensionsResources.Warning_colon_Declaration_changes_scope_and_may_change_meaning)
Microsoft.Interop.ComInterfaceGenerator (1)
Analyzers\ConvertComImportToGeneratedComInterfaceFixer.cs (1)
94WarningAnnotation.Create(SR.ConvertComInterfaceMayProduceInvalidCode));
Microsoft.Interop.LibraryImportGenerator (2)
Analyzers\ConvertToLibraryImportFixer.cs (2)
186generatedDeclaration = generatedDeclaration.WithAdditionalAnnotations(WarningAnnotation.Create(SR.ConvertNoPreserveSigDllImportToGeneratedMayProduceInvalidCode)); 232WarningAnnotation.Create(SR.ConvertToLibraryImportMayRequireCustomMarshalling));