ScriptBlockAst Class
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.
A ScriptBlockAst is the root ast node for a complete script.
public ref class ScriptBlockAst : System::Management::Automation::Language::Ast
public class ScriptBlockAst : System.Management.Automation.Language.Ast
type ScriptBlockAst = class
inherit Ast
Public Class ScriptBlockAst
Inherits Ast
- Inheritance
Constructors
Properties
Attributes |
The asts for attributes (such as [DscLocalConfigurationManager()]) used before the scriptblock. This property is never null. |
BeginBlock |
The ast representing the begin block for a script block, or null if no begin block was specified. |
CleanBlock |
Gets the ast representing the clean block for a script block, or null if no clean block was specified. |
DynamicParamBlock |
The ast representing the dynamicparam block for a script block, or null if no dynamicparam block was specified. |
EndBlock |
The ast representing the end block for a script block, or null if no end block was specified. |
Extent |
The extent in the source this ast represents. (Inherited from Ast) |
ParamBlock |
The ast representing the parameters for a script block, or null if no param block was specified. |
Parent |
The parent tree for this node. (Inherited from Ast) |
ProcessBlock |
The ast representing the process block for a script block, or null if no process block was specified. |
ScriptRequirements |
All of the parsed information from any #requires in the script, or null if #requires was not used. This property is only set for the top level script block (where Parent) is null. |
UsingStatements |
The asts for any using statements. This property is never null. Elements of the collection are instances of either UsingStatementAst or (only in error cases) ErrorStatementAst. |
Methods
Copy() |
Copy the ScriptBlockAst instance. |
Find(Func<Ast,Boolean>, Boolean) |
Traverse the entire Ast, returning the first node in the tree for which |
FindAll(Func<Ast,Boolean>, Boolean) |
Traverse the entire Ast, returning all nodes in the tree for which |
GetHelpContent() |
Return the help content, if any, for the script block. |
GetScriptBlock() |
Convert the ast into a script block that can be invoked. |
SafeGetValue() |
Constructs the resultant object from the AST and returns it if it is safe. (Inherited from Ast) |
SafeGetValue(Boolean) |
Constructs the resultant object from the AST and returns it if it is safe. (Inherited from Ast) |
ToString() |
Formats the ast and returns a string. (Inherited from Ast) |
Visit(AstVisitor) |
Visit each node in the Ast, calling the methods in |
Visit(ICustomAstVisitor) |
Visit the Ast using a visitor that can choose how the tree traversal is performed. This visit method is for advanced uses of the visitor pattern where an AstVisitor is insufficient. (Inherited from Ast) |