Partager via


RuntimeDefinedParameter Constructors

Definition

Overloads

RuntimeDefinedParameter()

Constructs a runtime-defined parameter instance.

RuntimeDefinedParameter(String, Type, Collection<Attribute>)

Constructs a new instance of a runtime-defined parameter using the specified parameters.

RuntimeDefinedParameter()

Constructs a runtime-defined parameter instance.

public:
 RuntimeDefinedParameter();
public:
 RuntimeDefinedParameter();
 RuntimeDefinedParameter();
public RuntimeDefinedParameter ();
Public Sub New ()

Applies to

RuntimeDefinedParameter(String, Type, Collection<Attribute>)

Constructs a new instance of a runtime-defined parameter using the specified parameters.

public:
 RuntimeDefinedParameter(System::String ^ name, Type ^ parameterType, System::Collections::ObjectModel::Collection<Attribute ^> ^ attributes);
public RuntimeDefinedParameter (string name, Type parameterType, System.Collections.ObjectModel.Collection<Attribute> attributes);
new System.Management.Automation.RuntimeDefinedParameter : string * Type * System.Collections.ObjectModel.Collection<Attribute> -> System.Management.Automation.RuntimeDefinedParameter
Public Sub New (name As String, parameterType As Type, attributes As Collection(Of Attribute))

Parameters

name
String

The name of the parameter. This cannot be null or empty.

parameterType
Type

The type of the parameter value. Arguments will be coerced to this type before binding. This parameter cannot be null.

attributes
Collection<Attribute>

Any parameter attributes that should be on the parameter. This can be any of the parameter attributes including but not limited to Validate*Attribute, ExpandWildcardAttribute, etc.

Exceptions

If name is null or empty.

If parameterType is null.

Applies to