SyntaxExtensions.FirstDescendantOrSelf Method
Containing Type: SyntaxExtensions
Assembly: Roslynator.Core.dll
Overloads
Method | Summary |
---|---|
FirstDescendantOrSelf<TNode>(SyntaxNode, Func<SyntaxNode, Boolean>, Boolean) | Searches a list of descendant nodes (including this node) in prefix document order and returns first descendant of type TNode. |
FirstDescendantOrSelf<TNode>(SyntaxNode, TextSpan, Func<SyntaxNode, Boolean>, Boolean) | Searches a list of descendant nodes (including this node) in prefix document order and returns first descendant of type TNode. |
FirstDescendantOrSelf<TNode>(SyntaxNode, Func<SyntaxNode, Boolean>, Boolean)
Searches a list of descendant nodes (including this node) in prefix document order and returns first descendant of type TNode.
public static TNode? FirstDescendantOrSelf<TNode>(this Microsoft.CodeAnalysis.SyntaxNode node, Func<Microsoft.CodeAnalysis.SyntaxNode, bool>? descendIntoChildren = null, bool descendIntoTrivia = false) where TNode : Microsoft.CodeAnalysis.SyntaxNode
Type Parameters
TNode
Parameters
node SyntaxNode
descendIntoChildren Func<SyntaxNode, Boolean>
descendIntoTrivia Boolean
Returns
TNode
FirstDescendantOrSelf<TNode>(SyntaxNode, TextSpan, Func<SyntaxNode, Boolean>, Boolean)
Searches a list of descendant nodes (including this node) in prefix document order and returns first descendant of type TNode.
public static TNode? FirstDescendantOrSelf<TNode>(this Microsoft.CodeAnalysis.SyntaxNode node, Microsoft.CodeAnalysis.Text.TextSpan span, Func<Microsoft.CodeAnalysis.SyntaxNode, bool>? descendIntoChildren = null, bool descendIntoTrivia = false) where TNode : Microsoft.CodeAnalysis.SyntaxNode
Type Parameters
TNode
Parameters
node SyntaxNode
span TextSpan
descendIntoChildren Func<SyntaxNode, Boolean>
descendIntoTrivia Boolean
Returns
TNode