Sdílet prostřednictvím


Ast.FindAll(Func<Ast,Boolean>, Boolean) Method

Definition

Traverse the entire Ast, returning all nodes in the tree for which predicate returns true.

public:
 System::Collections::Generic::IEnumerable<System::Management::Automation::Language::Ast ^> ^ FindAll(Func<System::Management::Automation::Language::Ast ^, bool> ^ predicate, bool searchNestedScriptBlocks);
public System.Collections.Generic.IEnumerable<System.Management.Automation.Language.Ast> FindAll (Func<System.Management.Automation.Language.Ast,bool> predicate, bool searchNestedScriptBlocks);
member this.FindAll : Func<System.Management.Automation.Language.Ast, bool> * bool -> seq<System.Management.Automation.Language.Ast>
Public Function FindAll (predicate As Func(Of Ast, Boolean), searchNestedScriptBlocks As Boolean) As IEnumerable(Of Ast)

Parameters

predicate
Func<Ast,Boolean>

The predicate function.

searchNestedScriptBlocks
Boolean

Search nested functions and script block expressions.

Returns

A possibly empty collection of matching Ast nodes.

Applies to