SyntaxNode.DescendantNodes 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
DescendantNodes(Func<SyntaxNode,Boolean>, Boolean) |
取得前置檔順序的子代節點清單。 |
DescendantNodes(TextSpan, Func<SyntaxNode,Boolean>, Boolean) |
取得前置檔順序的子代節點清單。 |
DescendantNodes(Func<SyntaxNode,Boolean>, Boolean)
取得前置檔順序的子代節點清單。
public System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.SyntaxNode> DescendantNodes (Func<Microsoft.CodeAnalysis.SyntaxNode,bool> descendIntoChildren = default, bool descendIntoTrivia = false);
public System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.SyntaxNode> DescendantNodes (Func<Microsoft.CodeAnalysis.SyntaxNode,bool>? descendIntoChildren = default, bool descendIntoTrivia = false);
member this.DescendantNodes : Func<Microsoft.CodeAnalysis.SyntaxNode, bool> * bool -> seq<Microsoft.CodeAnalysis.SyntaxNode>
Public Function DescendantNodes (Optional descendIntoChildren As Func(Of SyntaxNode, Boolean) = Nothing, Optional descendIntoTrivia As Boolean = false) As IEnumerable(Of SyntaxNode)
參數
- descendIntoChildren
- Func<SyntaxNode,Boolean>
選擇性函式,判斷搜尋是否遞減至引數節點的子系。
- descendIntoTrivia
- Boolean
判斷清單中是否包含屬於結構化 Trivia 的節點。
傳回
適用於
DescendantNodes(TextSpan, Func<SyntaxNode,Boolean>, Boolean)
取得前置檔順序的子代節點清單。
public System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.SyntaxNode> DescendantNodes (Microsoft.CodeAnalysis.Text.TextSpan span, Func<Microsoft.CodeAnalysis.SyntaxNode,bool> descendIntoChildren = default, bool descendIntoTrivia = false);
public System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.SyntaxNode> DescendantNodes (Microsoft.CodeAnalysis.Text.TextSpan span, Func<Microsoft.CodeAnalysis.SyntaxNode,bool>? descendIntoChildren = default, bool descendIntoTrivia = false);
member this.DescendantNodes : Microsoft.CodeAnalysis.Text.TextSpan * Func<Microsoft.CodeAnalysis.SyntaxNode, bool> * bool -> seq<Microsoft.CodeAnalysis.SyntaxNode>
Public Function DescendantNodes (span As TextSpan, Optional descendIntoChildren As Func(Of SyntaxNode, Boolean) = Nothing, Optional descendIntoTrivia As Boolean = false) As IEnumerable(Of SyntaxNode)
參數
- span
- TextSpan
節點的完整範圍必須交集。
- descendIntoChildren
- Func<SyntaxNode,Boolean>
選擇性函式,判斷搜尋是否遞減至引數節點的子系。
- descendIntoTrivia
- Boolean
判斷清單中是否包含屬於結構化 Trivia 的節點。