59 references to HasAnnotation
Microsoft.CodeAnalysis (2)
Syntax\SyntaxNodeExtensions_Tracking.cs (1)
53return root.ReplaceNodes(nodes, (n, r) => n.HasAnnotation(GetId(n)!) ? r : r.WithAdditionalAnnotations(GetId(n)!));
Syntax\SyntaxNodeOrToken.cs (1)
571return _nodeOrParent.HasAnnotation(annotation);
Microsoft.CodeAnalysis.CodeStyle (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AnnotationTable.cs (1)
160=> node.HasAnnotation(this.GetRealAnnotation(annotation));
Microsoft.CodeAnalysis.CodeStyle.Fixes (10)
src\Analyzers\Core\CodeFixes\RemoveUnusedParametersAndValues\AbstractRemoveUnusedValuesCodeFixProvider.cs (6)
789foreach (var memberDecl in newRoot.DescendantNodes().Where(n => n.HasAnnotation(s_memberAnnotation))) 834.Where(n => n.HasAnnotation(s_newLocalDeclarationStatementAnnotation) || 835n.HasAnnotation(s_existingLocalDeclarationWithoutInitializerAnnotation)) 867else if (declStatement.HasAnnotation(s_newLocalDeclarationStatementAnnotation)) 894if (newDecl.HasAnnotation(s_unusedLocalDeclarationAnnotation) || 895newDecl.HasAnnotation(s_existingLocalDeclarationWithoutInitializerAnnotation))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Editing\ImportAdderService.cs (2)
155var first = root.DescendantNodesAndSelf().First(x => x.HasAnnotation(annotation)); 156var last = root.DescendantNodesAndSelf().Last(x => x.HasAnnotation(annotation));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\AbstractSimplificationService.cs (1)
260currentNodeOrToken = newRoot.DescendantNodes().Single(c => c.HasAnnotation(marker));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\SimplificationHelpers.cs (1)
29var dontSimplifyResult = !to.HasAnnotation(Simplifier.Annotation);
Microsoft.CodeAnalysis.CSharp.CodeStyle (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TypeStyle\CSharpUseImplicitTypeHelper.cs (1)
38if (typeName.HasAnnotation(DoNotAllowVarAnnotation.Annotation))
Microsoft.CodeAnalysis.CSharp.Features (1)
IntroduceVariable\CSharpIntroduceVariableService.Rewriter.cs (1)
48if (innerExpression.HasAnnotation(_replacementAnnotation))
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (1)
Syntax\SyntaxNodeTests.cs (1)
519var nodesWithMyAnnotations = exprWithAnnotations.DescendantNodesAndSelf(n => n.ContainsAnnotations).Where(n => n.HasAnnotation(myAnnotation)).ToList();
Microsoft.CodeAnalysis.CSharp.Workspaces (20)
Simplification\CSharpSimplificationService.NodesAndTokensToReduceComputer.cs (1)
66_simplifyAllDescendants = _simplifyAllDescendants || node.HasAnnotation(Simplifier.Annotation);
Simplification\Reducers\AbstractCSharpReducer.AbstractReductionRewriter.cs (2)
134if (!this.alwaysSimplify && !node.HasAnnotation(Simplifier.Annotation)) 145if (!node.HasAnnotation(SimplificationHelpers.DoNotSimplifyAnnotation))
Simplification\Reducers\CSharpNameReducer.Rewriter.cs (10)
29this.alwaysSimplify = node.HasAnnotation(Simplifier.Annotation); 47this.alwaysSimplify = node.HasAnnotation(Simplifier.Annotation); 65this.alwaysSimplify = node.HasAnnotation(Simplifier.Annotation); 83this.alwaysSimplify = node.HasAnnotation(Simplifier.Annotation); 101this.alwaysSimplify = node.HasAnnotation(Simplifier.Annotation); 119this.alwaysSimplify = node.HasAnnotation(Simplifier.Annotation); 137this.alwaysSimplify = node.HasAnnotation(Simplifier.Annotation); 155this.alwaysSimplify = node.HasAnnotation(Simplifier.Annotation); 173this.alwaysSimplify = node.HasAnnotation(Simplifier.Annotation); 191this.alwaysSimplify = node.HasAnnotation(Simplifier.Annotation);
Simplification\Reducers\CSharpVarReducer.Rewriter.cs (2)
28if (!alwaysSimplify && !typeSyntax.HasAnnotation(Simplifier.Annotation)) 34if (typeSyntax.HasAnnotation(SimplificationHelpers.DoNotSimplifyAnnotation))
Simplification\Simplifiers\AbstractCSharpSimplifier.cs (2)
153if (!qualifiedName.Right.HasAnnotation(Simplifier.SpecialTypeAnnotation)) 167if (!aliasQualifiedNameSyntax.Name.HasAnnotation(Simplifier.SpecialTypeAnnotation))
Simplification\Simplifiers\NameSimplifier.cs (2)
216if (!qualifiedName2.Right.HasAnnotation(Simplifier.SpecialTypeAnnotation)) 226!aliasQualifiedName.Name.HasAnnotation(Simplifier.SpecialTypeAnnotation))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TypeStyle\CSharpUseImplicitTypeHelper.cs (1)
38if (typeName.HasAnnotation(DoNotAllowVarAnnotation.Annotation))
Microsoft.CodeAnalysis.Features (5)
src\Analyzers\Core\CodeFixes\RemoveUnusedParametersAndValues\AbstractRemoveUnusedValuesCodeFixProvider.cs (5)
834.Where(n => n.HasAnnotation(s_newLocalDeclarationStatementAnnotation) || 835n.HasAnnotation(s_existingLocalDeclarationWithoutInitializerAnnotation)) 867else if (declStatement.HasAnnotation(s_newLocalDeclarationStatementAnnotation)) 894if (newDecl.HasAnnotation(s_unusedLocalDeclarationAnnotation) || 895newDecl.HasAnnotation(s_existingLocalDeclarationWithoutInitializerAnnotation))
Microsoft.CodeAnalysis.VisualBasic.Features (1)
IntroduceVariable\VisualBasicIntroduceVariableService.Rewriter.vb (1)
40If innerExpression.HasAnnotation(_replacementAnnotation) AndAlso innerExpression.Equals(parenthesizedExpression.Expression) Then
Microsoft.CodeAnalysis.VisualBasic.Workspaces (10)
Simplification\Reducers\AbstractVisualBasicReducer.AbstractReductionRewriter.vb (1)
91If Not _alwaysSimplify AndAlso Not node.HasAnnotation(Simplifier.Annotation) Then
Simplification\Reducers\VisualBasicNameReducer.Rewriter.vb (6)
21Me._alwaysSimplify = node.HasAnnotation(Simplifier.Annotation) 37Me._alwaysSimplify = node.HasAnnotation(Simplifier.Annotation) 53Me._alwaysSimplify = node.HasAnnotation(Simplifier.Annotation) 69Me._alwaysSimplify = node.HasAnnotation(Simplifier.Annotation) 85Me._alwaysSimplify = node.HasAnnotation(Simplifier.Annotation) 101Me._alwaysSimplify = node.HasAnnotation(Simplifier.Annotation)
Simplification\Simplifiers\AbstractVisualBasicSimplifier.vb (1)
114If Not qualifiedName.Right.HasAnnotation(Simplifier.SpecialTypeAnnotation) Then
Simplification\VisualBasicSimplificationService.NodesAndTokensToReduceComputer.vb (2)
55Me._simplifyAllDescendants = Me._simplifyAllDescendants OrElse node.HasAnnotation(Simplifier.Annotation) 160Me._simplifyAllDescendants = Me._simplifyAllDescendants OrElse node.HasAnnotation(Simplifier.Annotation)
Microsoft.CodeAnalysis.Workspaces (6)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AnnotationTable.cs (1)
160=> node.HasAnnotation(this.GetRealAnnotation(annotation));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Editing\ImportAdderService.cs (2)
155var first = root.DescendantNodesAndSelf().First(x => x.HasAnnotation(annotation)); 156var last = root.DescendantNodesAndSelf().Last(x => x.HasAnnotation(annotation));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\AbstractSimplificationService.cs (2)
260currentNodeOrToken = newRoot.DescendantNodes().Single(c => c.HasAnnotation(marker)); 304importDeclarations.Where(n => !isNodeOrTokenOutsideSimplifySpan(n) && n.HasAnnotation(Simplifier.Annotation)),
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\SimplificationHelpers.cs (1)
29var dontSimplifyResult = !to.HasAnnotation(Simplifier.Annotation);
Microsoft.CodeAnalysis.Workspaces.UnitTests (1)
SolutionTests\SolutionTests.cs (1)
3208Assert.True(root2.HasAnnotation(annotation));