Compartilhar via


ParamBlockAst Constructor

Definition

Construct the ast for a param statement of a script block.

public:
 ParamBlockAst(System::Management::Automation::Language::IScriptExtent ^ extent, System::Collections::Generic::IEnumerable<System::Management::Automation::Language::AttributeAst ^> ^ attributes, System::Collections::Generic::IEnumerable<System::Management::Automation::Language::ParameterAst ^> ^ parameters);
public ParamBlockAst (System.Management.Automation.Language.IScriptExtent extent, System.Collections.Generic.IEnumerable<System.Management.Automation.Language.AttributeAst> attributes, System.Collections.Generic.IEnumerable<System.Management.Automation.Language.ParameterAst> parameters);
new System.Management.Automation.Language.ParamBlockAst : System.Management.Automation.Language.IScriptExtent * seq<System.Management.Automation.Language.AttributeAst> * seq<System.Management.Automation.Language.ParameterAst> -> System.Management.Automation.Language.ParamBlockAst
Public Sub New (extent As IScriptExtent, attributes As IEnumerable(Of AttributeAst), parameters As IEnumerable(Of ParameterAst))

Parameters

extent
IScriptExtent

The extent of the param statement, from any possible attributes to the closing paren.

attributes
IEnumerable<AttributeAst>

The attributes (such as [cmdletbinding()]) specified on the param statement. May be null.

parameters
IEnumerable<ParameterAst>

The parameters to the script block. May be null.

Exceptions

If extent is null.

Applies to