62 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)
787foreach (var memberDecl in newRoot.DescendantNodes().Where(n => n.HasAnnotation(s_memberAnnotation))) 832.Where(n => n.HasAnnotation(s_newLocalDeclarationStatementAnnotation) || 833n.HasAnnotation(s_existingLocalDeclarationWithoutInitializerAnnotation)) 865else if (declStatement.HasAnnotation(s_newLocalDeclarationStatementAnnotation)) 897if (newDecl.HasAnnotation(s_unusedLocalDeclarationAnnotation) || 898newDecl.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)
238currentNodeOrToken = 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 (2)
IntroduceVariable\CSharpIntroduceVariableService.Rewriter.cs (2)
47newNode.Expression.HasAnnotation(s_replacementAnnotation)) 64newNode.Expression.HasAnnotation(s_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)
149if (!qualifiedName.Right.HasAnnotation(Simplifier.SpecialTypeAnnotation)) 163if (!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)
832.Where(n => n.HasAnnotation(s_newLocalDeclarationStatementAnnotation) || 833n.HasAnnotation(s_existingLocalDeclarationWithoutInitializerAnnotation)) 865else if (declStatement.HasAnnotation(s_newLocalDeclarationStatementAnnotation)) 897if (newDecl.HasAnnotation(s_unusedLocalDeclarationAnnotation) || 898newDecl.HasAnnotation(s_existingLocalDeclarationWithoutInitializerAnnotation))
Microsoft.CodeAnalysis.VisualBasic.Features (3)
IntroduceVariable\VisualBasicIntroduceVariableService.Rewriter.vb (3)
41If innerExpression.HasAnnotation(s_replacementAnnotation) AndAlso innerExpression.Equals(parenthesizedExpression.Expression) Then 56newNode.Expression.HasAnnotation(s_replacementAnnotation) Then 73newNode.Expression.HasAnnotation(s_replacementAnnotation) AndAlso
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)
238currentNodeOrToken = newRoot.DescendantNodes().Single(c => c.HasAnnotation(marker)); 282importDeclarations.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));