Partager via


ScriptBlockAst Constructors

Definition

Overloads

ScriptBlockAst(IScriptExtent, ParamBlockAst, StatementBlockAst, Boolean)

Construct a ScriptBlockAst that does not use explicitly named blocks.

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

Initializes a new instance of the ScriptBlockAst class. This construction uses explicitly named begin/process/end/clean blocks.

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

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

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

Initializes a new instance of the ScriptBlockAst class. This construction uses explicitly named begin/process/end/clean blocks.

ScriptBlockAst(IScriptExtent, IEnumerable<UsingStatementAst>, 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)

Construct a ScriptBlockAst that does not use explicitly named blocks.

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

Initializes a new instance of the ScriptBlockAst class. This construction uses explicitly named begin/process/end/clean blocks.

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

Construct a ScriptBlockAst that does not use explicitly named blocks.

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

Construct a ScriptBlockAst that does not use explicitly named blocks.

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

Construct a ScriptBlockAst that does not use explicitly named blocks.

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

Construct a ScriptBlockAst that does not use explicitly named blocks.

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

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

ScriptBlockAst(IScriptExtent, ParamBlockAst, StatementBlockAst, Boolean)

Construct a ScriptBlockAst that does not use explicitly named blocks.

public:
 ScriptBlockAst(System::Management::Automation::Language::IScriptExtent ^ extent, System::Management::Automation::Language::ParamBlockAst ^ paramBlock, System::Management::Automation::Language::StatementBlockAst ^ statements, bool isFilter);
public ScriptBlockAst (System.Management.Automation.Language.IScriptExtent extent, System.Management.Automation.Language.ParamBlockAst paramBlock, System.Management.Automation.Language.StatementBlockAst statements, bool isFilter);
new System.Management.Automation.Language.ScriptBlockAst : System.Management.Automation.Language.IScriptExtent * System.Management.Automation.Language.ParamBlockAst * System.Management.Automation.Language.StatementBlockAst * bool -> System.Management.Automation.Language.ScriptBlockAst
Public Sub New (extent As IScriptExtent, paramBlock As ParamBlockAst, statements As StatementBlockAst, isFilter As Boolean)

Parameters

extent
IScriptExtent

The extent of the script block.

paramBlock
ParamBlockAst

The ast for the param block, may be null.

statements
StatementBlockAst

The statements that go in the end block if isFilter is false, or the process block if isFilter is true.

isFilter
Boolean

True if the script block is a filter, false if it is a function or workflow.

Exceptions

If extent or statements is null.

Applies to

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

Initializes a new instance of the ScriptBlockAst class. This construction uses explicitly named begin/process/end/clean blocks.

public ScriptBlockAst (System.Management.Automation.Language.IScriptExtent extent, System.Collections.Generic.IEnumerable<System.Management.Automation.Language.UsingStatementAst> usingStatements, System.Management.Automation.Language.ParamBlockAst paramBlock, System.Management.Automation.Language.NamedBlockAst beginBlock, System.Management.Automation.Language.NamedBlockAst processBlock, System.Management.Automation.Language.NamedBlockAst endBlock, System.Management.Automation.Language.NamedBlockAst cleanBlock, System.Management.Automation.Language.NamedBlockAst dynamicParamBlock);
new System.Management.Automation.Language.ScriptBlockAst : System.Management.Automation.Language.IScriptExtent * seq<System.Management.Automation.Language.UsingStatementAst> * System.Management.Automation.Language.ParamBlockAst * System.Management.Automation.Language.NamedBlockAst * System.Management.Automation.Language.NamedBlockAst * System.Management.Automation.Language.NamedBlockAst * System.Management.Automation.Language.NamedBlockAst * System.Management.Automation.Language.NamedBlockAst -> System.Management.Automation.Language.ScriptBlockAst
Public Sub New (extent As IScriptExtent, usingStatements As IEnumerable(Of UsingStatementAst), paramBlock As ParamBlockAst, beginBlock As NamedBlockAst, processBlock As NamedBlockAst, endBlock As NamedBlockAst, cleanBlock As NamedBlockAst, dynamicParamBlock As NamedBlockAst)

Parameters

extent
IScriptExtent

The extent of the script block.

usingStatements
IEnumerable<UsingStatementAst>

The list of using statments, may be null.

paramBlock
ParamBlockAst

The ast for the param block, may be null.

beginBlock
NamedBlockAst

The ast for the begin block, may be null.

processBlock
NamedBlockAst

The ast for the process block, may be null.

endBlock
NamedBlockAst

The ast for the end block, may be null.

cleanBlock
NamedBlockAst

The ast for the clean block, may be null.

dynamicParamBlock
NamedBlockAst

The ast for the dynamicparam block, may be null.

Exceptions

If extent is null.

Applies to

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

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

public:
 ScriptBlockAst(System::Management::Automation::Language::IScriptExtent ^ extent, System::Collections::Generic::IEnumerable<System::Management::Automation::Language::UsingStatementAst ^> ^ usingStatements, System::Collections::Generic::IEnumerable<System::Management::Automation::Language::AttributeAst ^> ^ attributes, System::Management::Automation::Language::ParamBlockAst ^ paramBlock, System::Management::Automation::Language::NamedBlockAst ^ beginBlock, System::Management::Automation::Language::NamedBlockAst ^ processBlock, System::Management::Automation::Language::NamedBlockAst ^ endBlock, System::Management::Automation::Language::NamedBlockAst ^ dynamicParamBlock);
public ScriptBlockAst (System.Management.Automation.Language.IScriptExtent extent, System.Collections.Generic.IEnumerable<System.Management.Automation.Language.UsingStatementAst> usingStatements, System.Collections.Generic.IEnumerable<System.Management.Automation.Language.AttributeAst> attributes, System.Management.Automation.Language.ParamBlockAst paramBlock, System.Management.Automation.Language.NamedBlockAst beginBlock, System.Management.Automation.Language.NamedBlockAst processBlock, System.Management.Automation.Language.NamedBlockAst endBlock, System.Management.Automation.Language.NamedBlockAst dynamicParamBlock);
new System.Management.Automation.Language.ScriptBlockAst : System.Management.Automation.Language.IScriptExtent * seq<System.Management.Automation.Language.UsingStatementAst> * seq<System.Management.Automation.Language.AttributeAst> * System.Management.Automation.Language.ParamBlockAst * System.Management.Automation.Language.NamedBlockAst * System.Management.Automation.Language.NamedBlockAst * System.Management.Automation.Language.NamedBlockAst * System.Management.Automation.Language.NamedBlockAst -> System.Management.Automation.Language.ScriptBlockAst
Public Sub New (extent As IScriptExtent, usingStatements As IEnumerable(Of UsingStatementAst), attributes As IEnumerable(Of AttributeAst), paramBlock As ParamBlockAst, beginBlock As NamedBlockAst, processBlock As NamedBlockAst, endBlock As NamedBlockAst, dynamicParamBlock As NamedBlockAst)

Parameters

extent
IScriptExtent

The extent of the script block.

usingStatements
IEnumerable<UsingStatementAst>

The list of using statments, may be null.

attributes
IEnumerable<AttributeAst>

The set of attributes for the script block.

paramBlock
ParamBlockAst

The ast for the param block, may be null.

beginBlock
NamedBlockAst

The ast for the begin block, may be null.

processBlock
NamedBlockAst

The ast for the process block, may be null.

endBlock
NamedBlockAst

The ast for the end block, may be null.

dynamicParamBlock
NamedBlockAst

The ast for the dynamicparam block, may be null.

Exceptions

If extent is null.

Applies to

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

Initializes a new instance of the ScriptBlockAst class. This construction uses explicitly named begin/process/end/clean blocks.

public ScriptBlockAst (System.Management.Automation.Language.IScriptExtent extent, System.Management.Automation.Language.ParamBlockAst paramBlock, System.Management.Automation.Language.NamedBlockAst beginBlock, System.Management.Automation.Language.NamedBlockAst processBlock, System.Management.Automation.Language.NamedBlockAst endBlock, System.Management.Automation.Language.NamedBlockAst cleanBlock, System.Management.Automation.Language.NamedBlockAst dynamicParamBlock);
new System.Management.Automation.Language.ScriptBlockAst : System.Management.Automation.Language.IScriptExtent * System.Management.Automation.Language.ParamBlockAst * System.Management.Automation.Language.NamedBlockAst * System.Management.Automation.Language.NamedBlockAst * System.Management.Automation.Language.NamedBlockAst * System.Management.Automation.Language.NamedBlockAst * System.Management.Automation.Language.NamedBlockAst -> System.Management.Automation.Language.ScriptBlockAst
Public Sub New (extent As IScriptExtent, paramBlock As ParamBlockAst, beginBlock As NamedBlockAst, processBlock As NamedBlockAst, endBlock As NamedBlockAst, cleanBlock As NamedBlockAst, dynamicParamBlock As NamedBlockAst)

Parameters

extent
IScriptExtent

The extent of the script block.

paramBlock
ParamBlockAst

The ast for the param block, may be null.

beginBlock
NamedBlockAst

The ast for the begin block, may be null.

processBlock
NamedBlockAst

The ast for the process block, may be null.

endBlock
NamedBlockAst

The ast for the end block, may be null.

cleanBlock
NamedBlockAst

The ast for the clean block, may be null.

dynamicParamBlock
NamedBlockAst

The ast for the dynamicparam block, may be null.

Exceptions

If extent is null.

Applies to

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

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

public:
 ScriptBlockAst(System::Management::Automation::Language::IScriptExtent ^ extent, System::Collections::Generic::IEnumerable<System::Management::Automation::Language::UsingStatementAst ^> ^ usingStatements, System::Management::Automation::Language::ParamBlockAst ^ paramBlock, System::Management::Automation::Language::NamedBlockAst ^ beginBlock, System::Management::Automation::Language::NamedBlockAst ^ processBlock, System::Management::Automation::Language::NamedBlockAst ^ endBlock, System::Management::Automation::Language::NamedBlockAst ^ dynamicParamBlock);
public ScriptBlockAst (System.Management.Automation.Language.IScriptExtent extent, System.Collections.Generic.IEnumerable<System.Management.Automation.Language.UsingStatementAst> usingStatements, System.Management.Automation.Language.ParamBlockAst paramBlock, System.Management.Automation.Language.NamedBlockAst beginBlock, System.Management.Automation.Language.NamedBlockAst processBlock, System.Management.Automation.Language.NamedBlockAst endBlock, System.Management.Automation.Language.NamedBlockAst dynamicParamBlock);
new System.Management.Automation.Language.ScriptBlockAst : System.Management.Automation.Language.IScriptExtent * seq<System.Management.Automation.Language.UsingStatementAst> * System.Management.Automation.Language.ParamBlockAst * System.Management.Automation.Language.NamedBlockAst * System.Management.Automation.Language.NamedBlockAst * System.Management.Automation.Language.NamedBlockAst * System.Management.Automation.Language.NamedBlockAst -> System.Management.Automation.Language.ScriptBlockAst
Public Sub New (extent As IScriptExtent, usingStatements As IEnumerable(Of UsingStatementAst), paramBlock As ParamBlockAst, beginBlock As NamedBlockAst, processBlock As NamedBlockAst, endBlock As NamedBlockAst, dynamicParamBlock As NamedBlockAst)

Parameters

extent
IScriptExtent

The extent of the script block.

usingStatements
IEnumerable<UsingStatementAst>

The list of using statments, may be null.

paramBlock
ParamBlockAst

The ast for the param block, may be null.

beginBlock
NamedBlockAst

The ast for the begin block, may be null.

processBlock
NamedBlockAst

The ast for the process block, may be null.

endBlock
NamedBlockAst

The ast for the end block, may be null.

dynamicParamBlock
NamedBlockAst

The ast for the dynamicparam block, may be null.

Exceptions

If extent is null.

Applies to

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

Construct a ScriptBlockAst that does not use explicitly named blocks.

public:
 ScriptBlockAst(System::Management::Automation::Language::IScriptExtent ^ extent, System::Collections::Generic::IEnumerable<System::Management::Automation::Language::UsingStatementAst ^> ^ usingStatements, System::Collections::Generic::IEnumerable<System::Management::Automation::Language::AttributeAst ^> ^ attributes, System::Management::Automation::Language::ParamBlockAst ^ paramBlock, System::Management::Automation::Language::StatementBlockAst ^ statements, bool isFilter, bool isConfiguration);
public ScriptBlockAst (System.Management.Automation.Language.IScriptExtent extent, System.Collections.Generic.IEnumerable<System.Management.Automation.Language.UsingStatementAst> usingStatements, System.Collections.Generic.IEnumerable<System.Management.Automation.Language.AttributeAst> attributes, System.Management.Automation.Language.ParamBlockAst paramBlock, System.Management.Automation.Language.StatementBlockAst statements, bool isFilter, bool isConfiguration);
new System.Management.Automation.Language.ScriptBlockAst : System.Management.Automation.Language.IScriptExtent * seq<System.Management.Automation.Language.UsingStatementAst> * seq<System.Management.Automation.Language.AttributeAst> * System.Management.Automation.Language.ParamBlockAst * System.Management.Automation.Language.StatementBlockAst * bool * bool -> System.Management.Automation.Language.ScriptBlockAst
Public Sub New (extent As IScriptExtent, usingStatements As IEnumerable(Of UsingStatementAst), attributes As IEnumerable(Of AttributeAst), paramBlock As ParamBlockAst, statements As StatementBlockAst, isFilter As Boolean, isConfiguration As Boolean)

Parameters

extent
IScriptExtent

The extent of the script block.

usingStatements
IEnumerable<UsingStatementAst>

The list of using statments, may be null.

attributes
IEnumerable<AttributeAst>

The attributes for the script block.

paramBlock
ParamBlockAst

The ast for the param block, may be null.

statements
StatementBlockAst

The statements that go in the end block if isFilter is false, or the process block if isFilter is true.

isFilter
Boolean

True if the script block is a filter, false if it is a function or workflow.

isConfiguration
Boolean

True if the script block is a configuration.

Exceptions

If extent or statements is null.

Applies to

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

Initializes a new instance of the ScriptBlockAst class. This construction uses explicitly named begin/process/end/clean blocks.

public ScriptBlockAst (System.Management.Automation.Language.IScriptExtent extent, System.Collections.Generic.IEnumerable<System.Management.Automation.Language.UsingStatementAst> usingStatements, System.Collections.Generic.IEnumerable<System.Management.Automation.Language.AttributeAst> attributes, System.Management.Automation.Language.ParamBlockAst paramBlock, System.Management.Automation.Language.NamedBlockAst beginBlock, System.Management.Automation.Language.NamedBlockAst processBlock, System.Management.Automation.Language.NamedBlockAst endBlock, System.Management.Automation.Language.NamedBlockAst cleanBlock, System.Management.Automation.Language.NamedBlockAst dynamicParamBlock);
new System.Management.Automation.Language.ScriptBlockAst : System.Management.Automation.Language.IScriptExtent * seq<System.Management.Automation.Language.UsingStatementAst> * seq<System.Management.Automation.Language.AttributeAst> * System.Management.Automation.Language.ParamBlockAst * System.Management.Automation.Language.NamedBlockAst * System.Management.Automation.Language.NamedBlockAst * System.Management.Automation.Language.NamedBlockAst * System.Management.Automation.Language.NamedBlockAst * System.Management.Automation.Language.NamedBlockAst -> System.Management.Automation.Language.ScriptBlockAst
Public Sub New (extent As IScriptExtent, usingStatements As IEnumerable(Of UsingStatementAst), attributes As IEnumerable(Of AttributeAst), paramBlock As ParamBlockAst, beginBlock As NamedBlockAst, processBlock As NamedBlockAst, endBlock As NamedBlockAst, cleanBlock As NamedBlockAst, dynamicParamBlock As NamedBlockAst)

Parameters

extent
IScriptExtent

The extent of the script block.

usingStatements
IEnumerable<UsingStatementAst>

The list of using statments, may be null.

attributes
IEnumerable<AttributeAst>

The set of attributes for the script block.

paramBlock
ParamBlockAst

The ast for the param block, may be null.

beginBlock
NamedBlockAst

The ast for the begin block, may be null.

processBlock
NamedBlockAst

The ast for the process block, may be null.

endBlock
NamedBlockAst

The ast for the end block, may be null.

cleanBlock
NamedBlockAst

The ast for the clean block, may be null.

dynamicParamBlock
NamedBlockAst

The ast for the dynamicparam block, may be null.

Exceptions

If extent is null.

Applies to

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

Construct a ScriptBlockAst that does not use explicitly named blocks.

public:
 ScriptBlockAst(System::Management::Automation::Language::IScriptExtent ^ extent, System::Collections::Generic::IEnumerable<System::Management::Automation::Language::UsingStatementAst ^> ^ usingStatements, System::Management::Automation::Language::ParamBlockAst ^ paramBlock, System::Management::Automation::Language::StatementBlockAst ^ statements, bool isFilter, bool isConfiguration);
public ScriptBlockAst (System.Management.Automation.Language.IScriptExtent extent, System.Collections.Generic.IEnumerable<System.Management.Automation.Language.UsingStatementAst> usingStatements, System.Management.Automation.Language.ParamBlockAst paramBlock, System.Management.Automation.Language.StatementBlockAst statements, bool isFilter, bool isConfiguration);
new System.Management.Automation.Language.ScriptBlockAst : System.Management.Automation.Language.IScriptExtent * seq<System.Management.Automation.Language.UsingStatementAst> * System.Management.Automation.Language.ParamBlockAst * System.Management.Automation.Language.StatementBlockAst * bool * bool -> System.Management.Automation.Language.ScriptBlockAst
Public Sub New (extent As IScriptExtent, usingStatements As IEnumerable(Of UsingStatementAst), paramBlock As ParamBlockAst, statements As StatementBlockAst, isFilter As Boolean, isConfiguration As Boolean)

Parameters

extent
IScriptExtent

The extent of the script block.

usingStatements
IEnumerable<UsingStatementAst>

The list of using statments, may be null.

paramBlock
ParamBlockAst

The ast for the param block, may be null.

statements
StatementBlockAst

The statements that go in the end block if isFilter is false, or the process block if isFilter is true.

isFilter
Boolean

True if the script block is a filter, false if it is a function or workflow.

isConfiguration
Boolean

True if the script block is a configuration.

Exceptions

If extent or statements is null.

Applies to

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

Construct a ScriptBlockAst that does not use explicitly named blocks.

public:
 ScriptBlockAst(System::Management::Automation::Language::IScriptExtent ^ extent, System::Collections::Generic::IEnumerable<System::Management::Automation::Language::AttributeAst ^> ^ attributes, System::Management::Automation::Language::ParamBlockAst ^ paramBlock, System::Management::Automation::Language::StatementBlockAst ^ statements, bool isFilter, bool isConfiguration);
public ScriptBlockAst (System.Management.Automation.Language.IScriptExtent extent, System.Collections.Generic.IEnumerable<System.Management.Automation.Language.AttributeAst> attributes, System.Management.Automation.Language.ParamBlockAst paramBlock, System.Management.Automation.Language.StatementBlockAst statements, bool isFilter, bool isConfiguration);
new System.Management.Automation.Language.ScriptBlockAst : System.Management.Automation.Language.IScriptExtent * seq<System.Management.Automation.Language.AttributeAst> * System.Management.Automation.Language.ParamBlockAst * System.Management.Automation.Language.StatementBlockAst * bool * bool -> System.Management.Automation.Language.ScriptBlockAst
Public Sub New (extent As IScriptExtent, attributes As IEnumerable(Of AttributeAst), paramBlock As ParamBlockAst, statements As StatementBlockAst, isFilter As Boolean, isConfiguration As Boolean)

Parameters

extent
IScriptExtent

The extent of the script block.

attributes
IEnumerable<AttributeAst>

The attributes for the script block.

paramBlock
ParamBlockAst

The ast for the param block, may be null.

statements
StatementBlockAst

The statements that go in the end block if isFilter is false, or the process block if isFilter is true.

isFilter
Boolean

True if the script block is a filter, false if it is a function or workflow.

isConfiguration
Boolean

True if the script block is a configuration.

Exceptions

If extent or statements is null.

Applies to

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

Construct a ScriptBlockAst that does not use explicitly named blocks.

public:
 ScriptBlockAst(System::Management::Automation::Language::IScriptExtent ^ extent, System::Management::Automation::Language::ParamBlockAst ^ paramBlock, System::Management::Automation::Language::StatementBlockAst ^ statements, bool isFilter, bool isConfiguration);
public ScriptBlockAst (System.Management.Automation.Language.IScriptExtent extent, System.Management.Automation.Language.ParamBlockAst paramBlock, System.Management.Automation.Language.StatementBlockAst statements, bool isFilter, bool isConfiguration);
new System.Management.Automation.Language.ScriptBlockAst : System.Management.Automation.Language.IScriptExtent * System.Management.Automation.Language.ParamBlockAst * System.Management.Automation.Language.StatementBlockAst * bool * bool -> System.Management.Automation.Language.ScriptBlockAst
Public Sub New (extent As IScriptExtent, paramBlock As ParamBlockAst, statements As StatementBlockAst, isFilter As Boolean, isConfiguration As Boolean)

Parameters

extent
IScriptExtent

The extent of the script block.

paramBlock
ParamBlockAst

The ast for the param block, may be null.

statements
StatementBlockAst

The statements that go in the end block if isFilter is false, or the process block if isFilter is true.

isFilter
Boolean

True if the script block is a filter, false if it is a function or workflow.

isConfiguration
Boolean

True if the script block is a configuration.

Exceptions

If extent or statements is null.

Applies to

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

Construct a ScriptBlockAst that does not use explicitly named blocks.

public:
 ScriptBlockAst(System::Management::Automation::Language::IScriptExtent ^ extent, System::Collections::Generic::List<System::Management::Automation::Language::UsingStatementAst ^> ^ usingStatements, System::Management::Automation::Language::ParamBlockAst ^ paramBlock, System::Management::Automation::Language::StatementBlockAst ^ statements, bool isFilter);
public ScriptBlockAst (System.Management.Automation.Language.IScriptExtent extent, System.Collections.Generic.List<System.Management.Automation.Language.UsingStatementAst> usingStatements, System.Management.Automation.Language.ParamBlockAst paramBlock, System.Management.Automation.Language.StatementBlockAst statements, bool isFilter);
new System.Management.Automation.Language.ScriptBlockAst : System.Management.Automation.Language.IScriptExtent * System.Collections.Generic.List<System.Management.Automation.Language.UsingStatementAst> * System.Management.Automation.Language.ParamBlockAst * System.Management.Automation.Language.StatementBlockAst * bool -> System.Management.Automation.Language.ScriptBlockAst
Public Sub New (extent As IScriptExtent, usingStatements As List(Of UsingStatementAst), paramBlock As ParamBlockAst, statements As StatementBlockAst, isFilter As Boolean)

Parameters

extent
IScriptExtent

The extent of the script block.

usingStatements
List<UsingStatementAst>

The list of using statments, may be null.

paramBlock
ParamBlockAst

The ast for the param block, may be null.

statements
StatementBlockAst

The statements that go in the end block if isFilter is false, or the process block if isFilter is true.

isFilter
Boolean

True if the script block is a filter, false if it is a function or workflow.

Exceptions

If extent or statements is null.

Applies to

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

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

public:
 ScriptBlockAst(System::Management::Automation::Language::IScriptExtent ^ extent, System::Management::Automation::Language::ParamBlockAst ^ paramBlock, System::Management::Automation::Language::NamedBlockAst ^ beginBlock, System::Management::Automation::Language::NamedBlockAst ^ processBlock, System::Management::Automation::Language::NamedBlockAst ^ endBlock, System::Management::Automation::Language::NamedBlockAst ^ dynamicParamBlock);
public ScriptBlockAst (System.Management.Automation.Language.IScriptExtent extent, System.Management.Automation.Language.ParamBlockAst paramBlock, System.Management.Automation.Language.NamedBlockAst beginBlock, System.Management.Automation.Language.NamedBlockAst processBlock, System.Management.Automation.Language.NamedBlockAst endBlock, System.Management.Automation.Language.NamedBlockAst dynamicParamBlock);
new System.Management.Automation.Language.ScriptBlockAst : System.Management.Automation.Language.IScriptExtent * System.Management.Automation.Language.ParamBlockAst * System.Management.Automation.Language.NamedBlockAst * System.Management.Automation.Language.NamedBlockAst * System.Management.Automation.Language.NamedBlockAst * System.Management.Automation.Language.NamedBlockAst -> System.Management.Automation.Language.ScriptBlockAst
Public Sub New (extent As IScriptExtent, paramBlock As ParamBlockAst, beginBlock As NamedBlockAst, processBlock As NamedBlockAst, endBlock As NamedBlockAst, dynamicParamBlock As NamedBlockAst)

Parameters

extent
IScriptExtent

The extent of the script block.

paramBlock
ParamBlockAst

The ast for the param block, may be null.

beginBlock
NamedBlockAst

The ast for the begin block, may be null.

processBlock
NamedBlockAst

The ast for the process block, may be null.

endBlock
NamedBlockAst

The ast for the end block, may be null.

dynamicParamBlock
NamedBlockAst

The ast for the dynamicparam block, may be null.

Exceptions

If extent is null.

Applies to