ScriptBlockAst ScriptBlockAst ScriptBlockAst Class

Definition

A ScriptBlockAst is the root ast node for a complete script.

public class ScriptBlockAst : System.Management.Automation.Language.Ast
type ScriptBlockAst = class
    inherit Ast
    interface IParameterMetadataProvider
Public Class ScriptBlockAst
Inherits Ast
Inheritance
ScriptBlockAstScriptBlockAstScriptBlockAst

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)

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, 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, 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)

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)

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)

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)

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<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)

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)

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)

Construct a ScriptBlockAst that does not use explicitly named blocks.

Properties

Attributes Attributes Attributes

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

BeginBlock BeginBlock BeginBlock

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

DynamicParamBlock DynamicParamBlock DynamicParamBlock

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

EndBlock EndBlock EndBlock

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

Extent Extent Extent Inherited from Ast
ImplementingAssembly ImplementingAssembly ImplementingAssembly
ParamBlock ParamBlock ParamBlock

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

Parent Parent Parent Inherited from Ast
ProcessBlock ProcessBlock ProcessBlock

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

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

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 the ScriptBlockAst instance

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

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

GetScriptBlock() GetScriptBlock() GetScriptBlock()

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

SafeGetValue() SafeGetValue() SafeGetValue() Inherited from Ast
ToString() ToString() ToString() Inherited from Ast
Visit(AstVisitor) Visit(AstVisitor) Visit(AstVisitor) Inherited from Ast
Visit(ICustomAstVisitor) Visit(ICustomAstVisitor) Visit(ICustomAstVisitor) Inherited from Ast

Applies to