167 references to DescendantNodesAndSelf
IdeCoreBenchmarks (1)
FormatterBenchmarks.cs (1)
71_ = formattedRoot.DescendantNodesAndSelf().ToImmutableArray();
Microsoft.Analyzers.Extra (2)
Utilities\SyntaxNodeExtensions.cs (2)
111var foundNode = currentNode.DescendantNodesAndSelf() 123.DescendantNodesAndSelf()
Microsoft.CodeAnalysis (5)
DiagnosticAnalyzer\AnalyzerDriver.cs (1)
2889foreach (var node in declaredNode.DescendantNodesAndSelf(descendIntoChildren: shouldAddNode, descendIntoTrivia: true))
DiagnosticAnalyzer\AnalyzerExecutor.cs (2)
712return cb.DescendantNodesAndSelf(descendIntoChildren: filter).Where(filter); 716return cb.DescendantNodesAndSelf();
SourceGeneration\GeneratorSyntaxWalker.cs (1)
28foreach (var child in node.DescendantNodesAndSelf())
SourceGeneration\Nodes\PredicateSyntaxStrategy.cs (1)
121foreach (var node in root.DescendantNodesAndSelf())
Microsoft.CodeAnalysis.CodeStyle (16)
src\Analyzers\Core\Analyzers\UseAutoProperty\AbstractUseAutoPropertyAnalyzer.cs (1)
191foreach (var identifierName in codeBlock.DescendantNodesAndSelf().OfType<TIdentifierName>())
src\Analyzers\Core\Analyzers\UseCoalesceExpression\AbstractUseCoalesceExpressionForIfNullCheckDiagnosticAnalyzer.cs (1)
176foreach (var identifier in whenPartToAnalyze.DescendantNodesAndSelf())
src\Analyzers\Core\Analyzers\UseCollectionInitializer\UpdateExpressionState.cs (1)
109foreach (var subExpression in expression.DescendantNodesAndSelf().OfType<TExpressionSyntax>())
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.InitialContextFinder.cs (1)
79node.DescendantNodesAndSelf(n => n != previous && n.Span.IntersectsWith(span) && !span.Contains(n.Span))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AbstractSpeculationAnalyzer.cs (12)
239Debug.Assert(this.SemanticRootOfOriginalExpression.DescendantNodesAndSelf().Contains(originalExpression)); 241Debug.Assert(this.SemanticRootOfReplacedExpression.DescendantNodesAndSelf().Contains(newExpression)); 263Debug.Assert(this.SemanticRootOfOriginalExpression.DescendantNodesAndSelf().Contains(originalExpression)); 265Debug.Assert(this.SemanticRootOfReplacedExpression.DescendantNodesAndSelf().Contains(newExpression)); 275Debug.Assert(this.SemanticRootOfOriginalExpression.DescendantNodesAndSelf().Contains(originalExpression)); 277Debug.Assert(this.SemanticRootOfReplacedExpression.DescendantNodesAndSelf().Contains(newExpression)); 285Debug.Assert(this.SemanticRootOfOriginalExpression.DescendantNodesAndSelf().Contains(originalExpression)); 287Debug.Assert(this.SemanticRootOfReplacedExpression.DescendantNodesAndSelf().Contains(newExpression)); 300Debug.Assert(this.SemanticRootOfOriginalExpression.DescendantNodesAndSelf().Contains(originalNode)); 302Debug.Assert(this.SemanticRootOfReplacedExpression.DescendantNodesAndSelf().Contains(newNode)); 613Debug.Assert(this.SemanticRootOfOriginalExpression.DescendantNodesAndSelf().Contains(originalExpression)); 615Debug.Assert(this.SemanticRootOfReplacedExpression.DescendantNodesAndSelf().Contains(newExpression));
Microsoft.CodeAnalysis.CodeStyle.Fixes (3)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Editing\ImportAdderService.cs (3)
56var nodes = root.DescendantNodesAndSelf(OverlapsWithSpan).Where(OverlapsWithSpan); 155var first = root.DescendantNodesAndSelf().First(x => x.HasAnnotation(annotation)); 156var last = root.DescendantNodesAndSelf().Last(x => x.HasAnnotation(annotation));
Microsoft.CodeAnalysis.CSharp (4)
Binder\Binder.IdentifierUsedAsValueFinder.cs (1)
33var nodesOfInterest = node.DescendantNodesAndSelf(descendIntoChildren: childrenNeedChecking, descendIntoTrivia: false);
Compiler\MethodCompiler.cs (2)
2211if (body1?.DescendantNodesAndSelf().Where(n => (object)n == _id).Any() == true || 2212body2?.DescendantNodesAndSelf().Where(n => (object)n == _id).Any() == true)
Syntax\SyntaxFacts.cs (1)
546return node.DescendantNodesAndSelf(child => !IsNestedFunction(child)).Any(
Microsoft.CodeAnalysis.CSharp.CodeStyle (9)
src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryLambdaExpression\CSharpRemoveUnnecessaryLambdaExpressionDiagnosticAnalyzer.cs (1)
283return !expression.DescendantNodesAndSelf().All(
src\Analyzers\CSharp\Analyzers\UseAutoProperty\CSharpUseAutoPropertyAnalyzer.cs (4)
54foreach (var argument in codeBlock.DescendantNodesAndSelf().OfType<ArgumentSyntax>()) 62foreach (var refExpression in codeBlock.DescendantNodesAndSelf().OfType<RefExpressionSyntax>()) 66foreach (var addressOfExpression in codeBlock.DescendantNodesAndSelf().OfType<PrefixUnaryExpressionSyntax>()) 72foreach (var memberAccess in codeBlock.DescendantNodesAndSelf().OfType<MemberAccessExpressionSyntax>())
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForBuilderDiagnosticAnalyzer.cs (1)
213foreach (var identifierName in statement.DescendantNodesAndSelf().OfType<IdentifierNameSyntax>())
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\UseCollectionExpressionHelpers.cs (1)
914if (assignmentExpression.Right.DescendantNodesAndSelf().OfType<IdentifierNameSyntax>().Any(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TypeStyle\CSharpUseImplicitTypeHelper.cs (2)
136.DescendantNodesAndSelf(descendIntoChildren: node => node is not AnonymousFunctionExpressionSyntax) 300if (initializer.DescendantNodesAndSelf()
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (3)
src\Analyzers\CSharp\CodeFixes\NewLines\EmbeddedStatementPlacement\EmbeddedStatementPlacementCodeFixProvider.cs (1)
78var descendentStatements = startStatement.DescendantNodesAndSelf().OfType<StatementSyntax>();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Editing\CSharpImportAdder.cs (1)
162foreach (var node in container.DescendantNodesAndSelf())
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (1)
2198foreach (var descendant in container.DescendantNodesAndSelf().OfType<IdentifierNameSyntax>())
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (2)
ExtractMethod\ExtractMethodBase.cs (1)
195var iterator = root.DescendantNodesAndSelf().Cast<SyntaxNode>();
SymbolKey\SymbolKeyTests.cs (1)
296var varDecl = root.DescendantNodesAndSelf().OfType<VariableDeclaratorSyntax>().Single();
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (2)
CodeGen\CodeGenDeconstructTests.cs (2)
5000var nodes = comp.SyntaxTrees[0].GetCompilationUnitRoot().DescendantNodesAndSelf(); 5123var nodes = comp.SyntaxTrees[0].GetCompilationUnitRoot().DescendantNodesAndSelf();
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (10)
Diagnostics\DiagnosticAnalyzerTests.cs (1)
4153var syntaxKinds = baseListNode.DescendantNodesAndSelf().Select(node => node.Kind()).Distinct().AsImmutable();
FlowAnalysis\RegionAnalysisTests.cs (4)
3102var statement = compilation.SyntaxTrees[0].GetCompilationUnitRoot().DescendantNodesAndSelf().OfType<StatementSyntax>().First(); 4526var stmt1 = tree.GetCompilationUnitRoot().DescendantNodesAndSelf().OfType<StatementSyntax>().Where(n => n.ToString() == "IntPtr p;").Single(); 4527var stmt2 = tree.GetCompilationUnitRoot().DescendantNodesAndSelf().OfType<StatementSyntax>().Where(n => n.ToString().StartsWith(keyword)).First(); 7909var stmt = tree.GetCompilationUnitRoot().DescendantNodesAndSelf().OfType<ForEachStatementSyntax>().Single().Statement;
Semantics\OutVarTests.cs (1)
20658Assert.Equal(1, compilation.SyntaxTrees[0].GetRoot().DescendantNodesAndSelf().OfType<DeclarationExpressionSyntax>().Count());
Semantics\PatternMatchingTests2.cs (4)
2160foreach (var pat in tree.GetRoot().DescendantNodesAndSelf().OfType<PatternSyntax>()) 2251var patterns = tree.GetRoot().DescendantNodesAndSelf().OfType<PatternSyntax>().ToArray(); 2295var patterns = tree.GetRoot().DescendantNodesAndSelf().OfType<PatternSyntax>().ToArray(); 2341var patterns = tree.GetRoot().DescendantNodesAndSelf().OfType<PatternSyntax>().ToArray();
Microsoft.CodeAnalysis.CSharp.Features (15)
AddImport\CSharpAddImportFeatureService.cs (1)
494var aliasQualifiedName = nameSyntax.DescendantNodesAndSelf()
CodeRefactorings\InlineTemporary\InlineTemporaryCodeRefactoringProvider.cs (1)
223var descendantNodesAndSelf = expression.DescendantNodesAndSelf();
Diagnostics\Analyzers\CSharpSimplifyTypeNamesDiagnosticAnalyzer.cs (1)
53Debug.Assert(context.CodeBlock.DescendantNodesAndSelf().Contains(root));
EditAndContinue\CSharpEditAndContinueAnalyzer.cs (1)
197from node in root.DescendantNodesAndSelf()
EditAndContinue\SyntaxUtilities.cs (2)
241=> body.DescendantNodesAndSelf(LambdaUtilities.IsNotLambda).Where(SyntaxBindingUtilities.BindsToResumableStateMachineState); 245=> body.DescendantNodesAndSelf(LambdaUtilities.IsNotLambda).Any(n => n is YieldStatementSyntax);
src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryLambdaExpression\CSharpRemoveUnnecessaryLambdaExpressionDiagnosticAnalyzer.cs (1)
283return !expression.DescendantNodesAndSelf().All(
src\Analyzers\CSharp\Analyzers\UseAutoProperty\CSharpUseAutoPropertyAnalyzer.cs (4)
54foreach (var argument in codeBlock.DescendantNodesAndSelf().OfType<ArgumentSyntax>()) 62foreach (var refExpression in codeBlock.DescendantNodesAndSelf().OfType<RefExpressionSyntax>()) 66foreach (var addressOfExpression in codeBlock.DescendantNodesAndSelf().OfType<PrefixUnaryExpressionSyntax>()) 72foreach (var memberAccess in codeBlock.DescendantNodesAndSelf().OfType<MemberAccessExpressionSyntax>())
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForBuilderDiagnosticAnalyzer.cs (1)
213foreach (var identifierName in statement.DescendantNodesAndSelf().OfType<IdentifierNameSyntax>())
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\UseCollectionExpressionHelpers.cs (1)
914if (assignmentExpression.Right.DescendantNodesAndSelf().OfType<IdentifierNameSyntax>().Any(
src\Analyzers\CSharp\CodeFixes\NewLines\EmbeddedStatementPlacement\EmbeddedStatementPlacementCodeFixProvider.cs (1)
78var descendentStatements = startStatement.DescendantNodesAndSelf().OfType<StatementSyntax>();
UseExpressionBody\UseExpressionBodyCodeRefactoringProvider.cs (1)
221foreach (var node in spanNode.DescendantNodesAndSelf())
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (7)
Semantics\LambdaTests.cs (6)
2417var reference = lambda.Body.DescendantNodesAndSelf().OfType<IdentifierNameSyntax>().First(); 2463var reference = lambda.Body.DescendantNodesAndSelf().OfType<IdentifierNameSyntax>().First(); 2509var reference = lambda.Body.DescendantNodesAndSelf().OfType<IdentifierNameSyntax>().First(); 2542var reference = lambda.Body.DescendantNodesAndSelf().OfType<IdentifierNameSyntax>().First(); 2575var reference = lambda.Body.DescendantNodesAndSelf().OfType<IdentifierNameSyntax>().First(); 2612var reference = lambda.Body.DescendantNodesAndSelf().OfType<IdentifierNameSyntax>().First();
Semantics\NullableReferenceTypesTests.cs (1)
3326var reference = lambda.Body.DescendantNodesAndSelf().OfType<IdentifierNameSyntax>().First();
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (10)
Compilation\GetSemanticInfoBrokenCodeTests.cs (2)
384return node.DescendantNodesAndSelf(descendIntoTrivia: true).OfType<ExpressionSyntax>(); 389return node.DescendantNodesAndSelf().OfType<StatementSyntax>();
Compilation\GetSemanticInfoTests.cs (5)
4212var syntax = tree.GetCompilationUnitRoot().FindToken(position).Parent.DescendantNodesAndSelf().OfType<OmittedTypeArgumentSyntax>().Single(); 4242var syntax = tree.GetCompilationUnitRoot().FindToken(position).Parent.DescendantNodesAndSelf().OfType<OmittedTypeArgumentSyntax>().Single(); 4272var syntax = tree.GetCompilationUnitRoot().FindToken(position).Parent.DescendantNodesAndSelf().OfType<GenericNameSyntax>().Single(); 4323var initializerSyntax = speculativeSyntax.DescendantNodesAndSelf().OfType<InitializerExpressionSyntax>().Single(); 4884var newSyntaxMemberAccess = newSyntax.DescendantNodesAndSelf().OfType<MemberAccessExpressionSyntax>().
Compilation\SemanticModelAPITests.cs (1)
3128Body.DescendantNodesAndSelf().OfType<IdentifierNameSyntax>().Single();
DocumentationComments\CrefTests.cs (1)
6216var alias = model.GetAliasInfo(crefSyntax.DescendantNodesAndSelf().OfType<IdentifierNameSyntax>().Single());
Symbols\IndexerTests.cs (1)
2539node.DescendantNodesAndSelf().Where(s => s.IsKind(SyntaxKind.ElementAccessExpression)).Cast<ElementAccessExpressionSyntax>();
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (20)
Diagnostics\LineSpanDirectiveTests.cs (2)
443foreach (var syntax in tree.GetRoot().DescendantNodesAndSelf()) 463var directives = tree.GetRoot().DescendantNodesAndSelf(descendIntoTrivia: true).OfType<DirectiveTriviaSyntax>();
IncrementalParsing\IncrementalParsingTests.cs (12)
491Assert.True(tree.GetRoot().DescendantNodesAndSelf().Any(n => n is AttributeSyntax)); 492Assert.False(tree.GetRoot().DescendantNodesAndSelf().Any(n => n is CollectionExpressionSyntax)); 501Assert.False(tree.GetRoot().DescendantNodesAndSelf().Any(n => n is AttributeSyntax)); 502Assert.True(tree.GetRoot().DescendantNodesAndSelf().Any(n => n is CollectionExpressionSyntax)); 523Assert.False(tree.GetRoot().DescendantNodesAndSelf().Any(n => n is AttributeSyntax)); 524Assert.True(tree.GetRoot().DescendantNodesAndSelf().Any(n => n is CollectionExpressionSyntax)); 533Assert.True(tree.GetRoot().DescendantNodesAndSelf().Any(n => n is AttributeSyntax)); 534Assert.False(tree.GetRoot().DescendantNodesAndSelf().Any(n => n is CollectionExpressionSyntax)); 564var localFunc1 = tree.GetRoot().DescendantNodesAndSelf().Single(n => n is LocalFunctionStatementSyntax); 565var innerConditionalExpr1 = localFunc1.DescendantNodesAndSelf().Single(n => n is ConditionalExpressionSyntax); 581var localFunc2 = tree.GetRoot().DescendantNodesAndSelf().Single(n => n is LocalFunctionStatementSyntax); 582var innerConditionalExpr2 = localFunc2.DescendantNodesAndSelf().Single(n => n is ConditionalExpressionSyntax);
Syntax\SyntaxNodeTests.cs (6)
181var nodes = statement.DescendantNodesAndSelf().ToList(); 186nodes = statement.DescendantNodesAndSelf(descendIntoTrivia: true).ToList(); 193nodes = statement.DescendantNodesAndSelf(n => n is StatementSyntax).ToList(); 198nodes = statement.DescendantNodesAndSelf(n => n is StatementSyntax, descendIntoTrivia: true).ToList(); 337var descendantDirectives = expr.DescendantNodesAndSelf(n => n.ContainsDirectives, descendIntoTrivia: true).OfType<DirectiveTriviaSyntax>().ToList(); 496var nodesWithMyAnnotations = exprWithAnnotations.DescendantNodesAndSelf(n => n.ContainsAnnotations).Where(n => n.HasAnnotation(myAnnotation)).ToList();
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
SemanticModelTestBase.cs (1)
110var constructorInitializers = node.DescendantNodesAndSelf(n => !(n is ExpressionSyntax)).Where(isConstructorInitializer);
Microsoft.CodeAnalysis.CSharp.Workspaces (5)
Simplification\CSharpSimplificationService.Expander.cs (1)
770var typeArgumentListSyntax = simpleName.DescendantNodesAndSelf().Where(n => n is TypeArgumentListSyntax);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TypeStyle\CSharpUseImplicitTypeHelper.cs (2)
136.DescendantNodesAndSelf(descendIntoChildren: node => node is not AnonymousFunctionExpressionSyntax) 300if (initializer.DescendantNodesAndSelf()
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Editing\CSharpImportAdder.cs (1)
162foreach (var node in container.DescendantNodesAndSelf())
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (1)
2198foreach (var descendant in container.DescendantNodesAndSelf().OfType<IdentifierNameSyntax>())
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (1)
CodeGeneration\AddImportsTests.cs (1)
47root = root.ReplaceNodes(root.DescendantNodesAndSelf().OfType<TypeSyntax>(),
Microsoft.CodeAnalysis.Features (13)
ConvertAnonymousType\AbstractConvertAnonymousTypeToClassCodeRefactoringProvider.cs (1)
196var childCreationNodes = containingMember.DescendantNodesAndSelf()
ConvertTupleToStruct\AbstractConvertTupleToStructCodeRefactoringProvider.cs (2)
643var childCreationNodes = containingMember.DescendantNodesAndSelf() 756var childTupleNodes = containingMember.DescendantNodesAndSelf()
EditAndContinue\DeclarationBody.cs (1)
43foreach (var node in root.DescendantNodesAndSelf(descendIntoChildren))
IntroduceParameter\IntroduceParameterDocumentRewriter.cs (1)
673var matches = from nodeInCurrent in _containerMethod.DescendantNodesAndSelf().OfType<TExpressionSyntax>()
IntroduceVariable\AbstractIntroduceVariableService.cs (1)
306var matches = from nodeInCurrent in withinNodeInCurrent.DescendantNodesAndSelf().OfType<TExpressionSyntax>()
InvertIf\AbstractInvertIfCodeRefactoringProvider.cs (2)
381return statementRange.FirstStatement.DescendantNodesAndSelf().All(IsNoOpSyntaxNode); 389if (!statements[i].DescendantNodesAndSelf().All(IsNoOpSyntaxNode))
ReplaceConditionalWithStatements\AbstractReplaceConditionalWithStatementsCodeRefactoringProvider.cs (1)
91foreach (var node in top.DescendantNodesAndSelf(DescendIntoChildren))
SpellCheck\AbstractSpellCheckCodeFixProvider.cs (1)
66foreach (var name in node.DescendantNodesAndSelf(DescendIntoChildren).OfType<TSimpleName>())
src\Analyzers\Core\Analyzers\UseAutoProperty\AbstractUseAutoPropertyAnalyzer.cs (1)
191foreach (var identifierName in codeBlock.DescendantNodesAndSelf().OfType<TIdentifierName>())
src\Analyzers\Core\Analyzers\UseCoalesceExpression\AbstractUseCoalesceExpressionForIfNullCheckDiagnosticAnalyzer.cs (1)
176foreach (var identifier in whenPartToAnalyze.DescendantNodesAndSelf())
src\Analyzers\Core\Analyzers\UseCollectionInitializer\UpdateExpressionState.cs (1)
109foreach (var subExpression in expression.DescendantNodesAndSelf().OfType<TExpressionSyntax>())
Microsoft.CodeAnalysis.Test.Utilities (3)
Compilation\CompilationExtensions.cs (2)
292foreach (var node in root.DescendantNodesAndSelf()) 394var nodes = tree.GetRoot().DescendantNodesAndSelf();
Compilation\ControlFlowGraphVerifier.cs (1)
577conditional.WhenNotNull.DescendantNodesAndSelf().
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Editing\VisualBasicImportAdder.vb (1)
156For Each node In container.DescendantNodesAndSelf()
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\ExpressionSyntaxExtensions.vb (1)
229Dim descendentExpressions = expression.DescendantNodesAndSelf().OfType(Of ExpressionSyntax).Where(Function(e) span.Contains(e.Span)).ToSet()
Microsoft.CodeAnalysis.VisualBasic.Features (4)
CodeFixes\GenerateEvent\GenerateEventCodeFixProvider.vb (1)
161Dim unaryExpression = TryCast(handlerStatement.DelegateExpression.DescendantNodesAndSelf().Where(Function(n) n.IsKind(SyntaxKind.AddressOfExpression)).FirstOrDefault, UnaryExpressionSyntax)
Diagnostics\Analyzers\VisualBasicSimplifyTypeNamesDiagnosticAnalyzer.vb (1)
39Debug.Assert(context.CodeBlock.DescendantNodesAndSelf().Contains(root))
ExtractMethod\Extensions.vb (2)
228Return node.DescendantNodesAndSelf().Any(Function(n) TypeOf n Is FieldInitializerSyntax) 242Return node.DescendantNodesAndSelf().Any(predicate)
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (4)
Compilation\GetSemanticInfoBrokenCodeTests.vb (3)
494For Each node In node.DescendantNodesAndSelf() 500Return node.DescendantNodesAndSelf(descendIntoTrivia:=True).OfType(Of ExpressionSyntax)() 504Return node.DescendantNodesAndSelf().OfType(Of ExecutableStatementSyntax)()
Compilation\SemanticModelAPITests.vb (1)
4132Dim newSyntaxMemberAccess = newSyntax.DescendantNodesAndSelf().OfType(Of MemberAccessExpressionSyntax)().
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (2)
TestSyntaxNodes.vb (2)
2444Dim nodes = statement.DescendantNodesAndSelf().ToList() 2449nodes = statement.DescendantNodesAndSelf(descendIntoTrivia:=True).ToList()
Microsoft.CodeAnalysis.VisualBasic.Workspaces (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Editing\VisualBasicImportAdder.vb (1)
156For Each node In container.DescendantNodesAndSelf()
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\ExpressionSyntaxExtensions.vb (1)
229Dim descendentExpressions = expression.DescendantNodesAndSelf().OfType(Of ExpressionSyntax).Where(Function(e) span.Contains(e.Span)).ToSet()
Microsoft.CodeAnalysis.VisualBasic.Workspaces.UnitTests (1)
CodeGeneration\AddImportsTests.vb (1)
52root = root.ReplaceNodes(root.DescendantNodesAndSelf().OfType(Of TypeSyntax)(),
Microsoft.CodeAnalysis.Workspaces (17)
Rename\Renamer.RenameSymbolDocumentAction.cs (1)
74var typeDeclarations = syntaxRoot.DescendantNodesAndSelf(n => !syntaxFacts.IsMethodBody(n)).Where(syntaxFacts.IsTypeDeclaration);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.InitialContextFinder.cs (1)
79node.DescendantNodesAndSelf(n => n != previous && n.Span.IntersectsWith(span) && !span.Contains(n.Span))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AbstractSpeculationAnalyzer.cs (12)
239Debug.Assert(this.SemanticRootOfOriginalExpression.DescendantNodesAndSelf().Contains(originalExpression)); 241Debug.Assert(this.SemanticRootOfReplacedExpression.DescendantNodesAndSelf().Contains(newExpression)); 263Debug.Assert(this.SemanticRootOfOriginalExpression.DescendantNodesAndSelf().Contains(originalExpression)); 265Debug.Assert(this.SemanticRootOfReplacedExpression.DescendantNodesAndSelf().Contains(newExpression)); 275Debug.Assert(this.SemanticRootOfOriginalExpression.DescendantNodesAndSelf().Contains(originalExpression)); 277Debug.Assert(this.SemanticRootOfReplacedExpression.DescendantNodesAndSelf().Contains(newExpression)); 285Debug.Assert(this.SemanticRootOfOriginalExpression.DescendantNodesAndSelf().Contains(originalExpression)); 287Debug.Assert(this.SemanticRootOfReplacedExpression.DescendantNodesAndSelf().Contains(newExpression)); 300Debug.Assert(this.SemanticRootOfOriginalExpression.DescendantNodesAndSelf().Contains(originalNode)); 302Debug.Assert(this.SemanticRootOfReplacedExpression.DescendantNodesAndSelf().Contains(newNode)); 613Debug.Assert(this.SemanticRootOfOriginalExpression.DescendantNodesAndSelf().Contains(originalExpression)); 615Debug.Assert(this.SemanticRootOfReplacedExpression.DescendantNodesAndSelf().Contains(newExpression));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Editing\ImportAdderService.cs (3)
56var nodes = root.DescendantNodesAndSelf(OverlapsWithSpan).Where(OverlapsWithSpan); 155var first = root.DescendantNodesAndSelf().First(x => x.HasAnnotation(annotation)); 156var last = root.DescendantNodesAndSelf().Last(x => x.HasAnnotation(annotation));
Microsoft.Interop.SourceGeneration (1)
Marshalling\AttributedMarshallingModelGeneratorResolver.cs (1)
414originalTypeSyntax.DescendantNodesAndSelf().OfType<TypeSyntax>().Where(t => t.IsEquivalentTo(marshalInfo.PlaceholderTypeParameter.Syntax)),
System.Windows.Forms.Analyzers.CodeFixes.CSharp (1)
System\Windows\Forms\CSharp\CodeFixes\AddDesignerSerializationVisibility\AddDesignerSerializationVisibilityCodeFixProvider.cs (1)
116.DescendantNodesAndSelf()
System.Windows.Forms.Analyzers.CodeFixes.VisualBasic (1)
AddDesignerSerializationVisibility\AddDesignerSerializationVisibilityCodeFixProvider.vb (1)
130DescendantNodesAndSelf().