ScriptBlockAst ScriptBlockAst ScriptBlockAst ScriptBlockAst Class

Definition

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
    interface IParameterMetadataProvider
Public Class ScriptBlockAst
Inherits Ast
Inheritance
ScriptBlockAstScriptBlockAstScriptBlockAstScriptBlockAst

Constructors

ScriptBlockAst(IScriptExtent, IEnumerable<AttributeAst>, ParamBlockAst, StatementBlockAst, Boolean, Boolean) ScriptBlockAst(IScriptExtent, IEnumerable<AttributeAst>, ParamBlockAst, StatementBlockAst, Boolean, Boolean) ScriptBlockAst(IScriptExtent, IEnumerable<AttributeAst>, ParamBlockAst, StatementBlockAst, Boolean, Boolean) ScriptBlockAst(IScriptExtent, IEnumerable<AttributeAst>, ParamBlockAst, StatementBlockAst, Boolean, Boolean)

Construct a ScriptBlockAst that does not use explicitly named blocks.

ScriptBlockAst(IScriptExtent, IEnumerable<StatementAst>, IEnumerable<AttributeAst>, ParamBlockAst, NamedBlockAst, NamedBlockAst, NamedBlockAst, NamedBlockAst) ScriptBlockAst(IScriptExtent, IEnumerable<StatementAst>, IEnumerable<AttributeAst>, ParamBlockAst, NamedBlockAst, NamedBlockAst, NamedBlockAst, NamedBlockAst) ScriptBlockAst(IScriptExtent, IEnumerable<StatementAst>, IEnumerable<AttributeAst>, ParamBlockAst, NamedBlockAst, NamedBlockAst, NamedBlockAst, NamedBlockAst) ScriptBlockAst(IScriptExtent, IEnumerable<StatementAst>, IEnumerable<AttributeAst>, ParamBlockAst, NamedBlockAst, NamedBlockAst, NamedBlockAst, NamedBlockAst)
ScriptBlockAst(IScriptExtent, IEnumerable<StatementAst>, IEnumerable<AttributeAst>, ParamBlockAst, StatementBlockAst, Boolean, Boolean) ScriptBlockAst(IScriptExtent, IEnumerable<StatementAst>, IEnumerable<AttributeAst>, ParamBlockAst, StatementBlockAst, Boolean, Boolean) ScriptBlockAst(IScriptExtent, IEnumerable<StatementAst>, IEnumerable<AttributeAst>, ParamBlockAst, StatementBlockAst, Boolean, Boolean) ScriptBlockAst(IScriptExtent, IEnumerable<StatementAst>, IEnumerable<AttributeAst>, ParamBlockAst, StatementBlockAst, Boolean, Boolean)
ScriptBlockAst(IScriptExtent, IEnumerable<StatementAst>, ParamBlockAst, NamedBlockAst, NamedBlockAst, NamedBlockAst, NamedBlockAst) ScriptBlockAst(IScriptExtent, IEnumerable<StatementAst>, ParamBlockAst, NamedBlockAst, NamedBlockAst, NamedBlockAst, NamedBlockAst) ScriptBlockAst(IScriptExtent, IEnumerable<StatementAst>, ParamBlockAst, NamedBlockAst, NamedBlockAst, NamedBlockAst, NamedBlockAst) ScriptBlockAst(IScriptExtent, IEnumerable<StatementAst>, ParamBlockAst, NamedBlockAst, NamedBlockAst, NamedBlockAst, NamedBlockAst)
ScriptBlockAst(IScriptExtent, IEnumerable<StatementAst>, ParamBlockAst, StatementBlockAst, Boolean, Boolean) ScriptBlockAst(IScriptExtent, IEnumerable<StatementAst>, ParamBlockAst, StatementBlockAst, Boolean, Boolean) ScriptBlockAst(IScriptExtent, IEnumerable<StatementAst>, ParamBlockAst, StatementBlockAst, Boolean, Boolean) ScriptBlockAst(IScriptExtent, IEnumerable<StatementAst>, ParamBlockAst, StatementBlockAst, Boolean, Boolean)
ScriptBlockAst(IScriptExtent, IEnumerable<UsingStatementAst>, IEnumerable<AttributeAst>, ParamBlockAst, NamedBlockAst, NamedBlockAst, NamedBlockAst, NamedBlockAst) ScriptBlockAst(IScriptExtent, IEnumerable<UsingStatementAst>, IEnumerable<AttributeAst>, ParamBlockAst, NamedBlockAst, NamedBlockAst, NamedBlockAst, NamedBlockAst) ScriptBlockAst(IScriptExtent, IEnumerable<UsingStatementAst>, IEnumerable<AttributeAst>, ParamBlockAst, NamedBlockAst, NamedBlockAst, NamedBlockAst, NamedBlockAst) ScriptBlockAst(IScriptExtent, IEnumerable<UsingStatementAst>, IEnumerable<AttributeAst>, ParamBlockAst, NamedBlockAst, NamedBlockAst, NamedBlockAst, NamedBlockAst)

Construct a ScriptBlockAst that uses explicitly named begin/process/end blocks.

ScriptBlockAst(IScriptExtent, IEnumerable<UsingStatementAst>, IEnumerable<AttributeAst>, ParamBlockAst, StatementBlockAst, Boolean, Boolean) ScriptBlockAst(IScriptExtent, IEnumerable<UsingStatementAst>, IEnumerable<AttributeAst>, ParamBlockAst, StatementBlockAst, Boolean, Boolean) ScriptBlockAst(IScriptExtent, IEnumerable<UsingStatementAst>, IEnumerable<AttributeAst>, ParamBlockAst, StatementBlockAst, Boolean, Boolean) ScriptBlockAst(IScriptExtent, IEnumerable<UsingStatementAst>, IEnumerable<AttributeAst>, ParamBlockAst, StatementBlockAst, Boolean, Boolean)

Construct a ScriptBlockAst that does not use explicitly named blocks.

ScriptBlockAst(IScriptExtent, IEnumerable<UsingStatementAst>, ParamBlockAst, NamedBlockAst, NamedBlockAst, NamedBlockAst, NamedBlockAst) ScriptBlockAst(IScriptExtent, IEnumerable<UsingStatementAst>, ParamBlockAst, NamedBlockAst, NamedBlockAst, NamedBlockAst, NamedBlockAst) ScriptBlockAst(IScriptExtent, IEnumerable<UsingStatementAst>, ParamBlockAst, NamedBlockAst, NamedBlockAst, NamedBlockAst, NamedBlockAst) ScriptBlockAst(IScriptExtent, IEnumerable<UsingStatementAst>, ParamBlockAst, NamedBlockAst, NamedBlockAst, NamedBlockAst, NamedBlockAst)

Construct a ScriptBlockAst that uses explicitly named begin/process/end blocks.

ScriptBlockAst(IScriptExtent, IEnumerable<UsingStatementAst>, ParamBlockAst, StatementBlockAst, Boolean, Boolean) ScriptBlockAst(IScriptExtent, IEnumerable<UsingStatementAst>, ParamBlockAst, StatementBlockAst, Boolean, Boolean) ScriptBlockAst(IScriptExtent, IEnumerable<UsingStatementAst>, ParamBlockAst, StatementBlockAst, Boolean, Boolean) ScriptBlockAst(IScriptExtent, IEnumerable<UsingStatementAst>, ParamBlockAst, StatementBlockAst, Boolean, Boolean)

Construct a ScriptBlockAst that does not use explicitly named blocks.

ScriptBlockAst(IScriptExtent, List<StatementAst>, ParamBlockAst, StatementBlockAst, Boolean) ScriptBlockAst(IScriptExtent, List<StatementAst>, ParamBlockAst, StatementBlockAst, Boolean) ScriptBlockAst(IScriptExtent, List<StatementAst>, ParamBlockAst, StatementBlockAst, Boolean) ScriptBlockAst(IScriptExtent, List<StatementAst>, ParamBlockAst, StatementBlockAst, Boolean)
ScriptBlockAst(IScriptExtent, List<UsingStatementAst>, ParamBlockAst, StatementBlockAst, Boolean) ScriptBlockAst(IScriptExtent, List<UsingStatementAst>, ParamBlockAst, StatementBlockAst, Boolean) ScriptBlockAst(IScriptExtent, List<UsingStatementAst>, ParamBlockAst, StatementBlockAst, Boolean) ScriptBlockAst(IScriptExtent, List<UsingStatementAst>, ParamBlockAst, StatementBlockAst, Boolean)

Construct a ScriptBlockAst that does not use explicitly named blocks.

ScriptBlockAst(IScriptExtent, ParamBlockAst, NamedBlockAst, NamedBlockAst, NamedBlockAst, NamedBlockAst) ScriptBlockAst(IScriptExtent, ParamBlockAst, NamedBlockAst, NamedBlockAst, NamedBlockAst, NamedBlockAst) ScriptBlockAst(IScriptExtent, ParamBlockAst, NamedBlockAst, NamedBlockAst, NamedBlockAst, NamedBlockAst) ScriptBlockAst(IScriptExtent, ParamBlockAst, NamedBlockAst, NamedBlockAst, NamedBlockAst, NamedBlockAst)

Construct a ScriptBlockAst that uses explicitly named begin/process/end blocks.

ScriptBlockAst(IScriptExtent, ParamBlockAst, StatementBlockAst, Boolean) ScriptBlockAst(IScriptExtent, ParamBlockAst, StatementBlockAst, Boolean) ScriptBlockAst(IScriptExtent, ParamBlockAst, StatementBlockAst, Boolean) ScriptBlockAst(IScriptExtent, ParamBlockAst, StatementBlockAst, Boolean)

Construct a ScriptBlockAst that does not use explicitly named blocks.

ScriptBlockAst(IScriptExtent, ParamBlockAst, StatementBlockAst, Boolean, Boolean) ScriptBlockAst(IScriptExtent, ParamBlockAst, StatementBlockAst, Boolean, Boolean) ScriptBlockAst(IScriptExtent, ParamBlockAst, StatementBlockAst, Boolean, Boolean) ScriptBlockAst(IScriptExtent, ParamBlockAst, StatementBlockAst, Boolean, Boolean)

Construct a ScriptBlockAst that does not use explicitly named blocks.

Properties

Attributes Attributes Attributes Attributes

The asts for attributes (such as [DscLocalConfigurationManager()]) used before the scriptblock. This property is never null.

BeginBlock BeginBlock BeginBlock BeginBlock

The ast representing the begin block for a script block, or null if no begin block was specified.

DynamicParamBlock DynamicParamBlock DynamicParamBlock DynamicParamBlock

The ast representing the dynamicparam block for a script block, or null if no dynamicparam block was specified.

EndBlock EndBlock EndBlock EndBlock

The ast representing the end block for a script block, or null if no end block was specified.

Extent Extent Extent Extent

The extent in the source this ast represents.

(Inherited from Ast)
ImplementingAssembly ImplementingAssembly ImplementingAssembly ImplementingAssembly
ParamBlock ParamBlock ParamBlock ParamBlock

The ast representing the parameters for a script block, or null if no param block was specified.

Parent Parent Parent Parent

The parent tree for this node.

(Inherited from Ast)
ProcessBlock ProcessBlock ProcessBlock ProcessBlock

The ast representing the process block for a script block, or null if no process block was specified.

ScriptRequirements ScriptRequirements ScriptRequirements 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 UsingStatements UsingStatements 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() Copy() Copy()

Copy the ScriptBlockAst instance

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

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

(Inherited from Ast)
FindAll(Func<Ast,Boolean>, Boolean) FindAll(Func<Ast,Boolean>, Boolean) FindAll(Func<Ast,Boolean>, Boolean) FindAll(Func<Ast,Boolean>, Boolean)

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

(Inherited from Ast)
GetHelpContent() GetHelpContent() GetHelpContent() GetHelpContent()

Return the help content, if any, for the script block.

GetScriptBlock() GetScriptBlock() GetScriptBlock() GetScriptBlock()

Convert the ast into a script block that can be invoked.

SafeGetValue() SafeGetValue() SafeGetValue() SafeGetValue()

Constructs the resultant object from the AST and returns it if it is safe.

(Inherited from Ast)
ToString() ToString() ToString() ToString()

Formats the ast and returns a string.

(Inherited from Ast)
Visit(AstVisitor) Visit(AstVisitor) Visit(AstVisitor) Visit(AstVisitor)

Visit each node in the Ast, calling the methods in astVisitor for each node in the ast.

(Inherited from Ast)
Visit(ICustomAstVisitor) Visit(ICustomAstVisitor) Visit(ICustomAstVisitor) 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)

Applies to