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

Definition

Traverse the entire Ast, returning the first node in the tree for which predicate returns true.

C++
public:
 System::Management::Automation::Language::Ast ^ Find(Func<System::Management::Automation::Language::Ast ^, bool> ^ predicate, bool searchNestedScriptBlocks);

Parameters

predicate
Func<Ast,Boolean>

The predicate.

searchNestedScriptBlocks
Boolean

Search nested functions and script block expressions.

Returns

Ast

The first matching node, or null if there is no match.

Applies to

Producto Versiones
PowerShell SDK 7.2.0, 7.3.0, 7.4.0
Windows PowerShell 5.1.0.0