Ast.Find(Func<Ast,Boolean>, Boolean) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Traverse the entire Ast, returning the first node in the tree for which predicate
returns true.
public:
System::Management::Automation::Language::Ast ^ Find(Func<System::Management::Automation::Language::Ast ^, bool> ^ predicate, bool searchNestedScriptBlocks);
public System.Management.Automation.Language.Ast Find (Func<System.Management.Automation.Language.Ast,bool> predicate, bool searchNestedScriptBlocks);
member this.Find : Func<System.Management.Automation.Language.Ast, bool> * bool -> System.Management.Automation.Language.Ast
Public Function Find (predicate As Func(Of Ast, Boolean), searchNestedScriptBlocks As Boolean) As Ast
Parameters
- searchNestedScriptBlocks
- Boolean
Search nested functions and script block expressions.
Returns
The first matching node, or null if there is no match.