Partilhar via


AttributeAst Constructor

Definition

Construct an attribute ast.

public:
 AttributeAst(System::Management::Automation::Language::IScriptExtent ^ extent, System::Management::Automation::Language::ITypeName ^ typeName, System::Collections::Generic::IEnumerable<System::Management::Automation::Language::ExpressionAst ^> ^ positionalArguments, System::Collections::Generic::IEnumerable<System::Management::Automation::Language::NamedAttributeArgumentAst ^> ^ namedArguments);
public AttributeAst (System.Management.Automation.Language.IScriptExtent extent, System.Management.Automation.Language.ITypeName typeName, System.Collections.Generic.IEnumerable<System.Management.Automation.Language.ExpressionAst> positionalArguments, System.Collections.Generic.IEnumerable<System.Management.Automation.Language.NamedAttributeArgumentAst> namedArguments);
new System.Management.Automation.Language.AttributeAst : System.Management.Automation.Language.IScriptExtent * System.Management.Automation.Language.ITypeName * seq<System.Management.Automation.Language.ExpressionAst> * seq<System.Management.Automation.Language.NamedAttributeArgumentAst> -> System.Management.Automation.Language.AttributeAst
Public Sub New (extent As IScriptExtent, typeName As ITypeName, positionalArguments As IEnumerable(Of ExpressionAst), namedArguments As IEnumerable(Of NamedAttributeArgumentAst))

Parameters

extent
IScriptExtent

The extent of the attribute from opening '[' to closing ']'.

typeName
ITypeName

The attribute name.

positionalArguments
IEnumerable<ExpressionAst>

The positional arguments, may be null.

namedArguments
IEnumerable<NamedAttributeArgumentAst>

The named arguments, may be null.

Exceptions

If extent or typeName is null.

Applies to