Compartir a través de


IDynamicParameters.GetDynamicParameters Method

Definition

Returns an instance of an object that defines the dynamic parameters for this Cmdlet or CmdletProvider.

public:
 System::Object ^ GetDynamicParameters();
public:
 Platform::Object ^ GetDynamicParameters();
winrt::Windows::Foundation::IInspectable GetDynamicParameters();
public object GetDynamicParameters ();
public object? GetDynamicParameters ();
abstract member GetDynamicParameters : unit -> obj
Public Function GetDynamicParameters () As Object

Returns

This method should return an object that has properties and fields decorated with parameter attributes similar to a Cmdlet or CmdletProvider. These attributes include ParameterAttribute, AliasAttribute, argument transformation and validation attributes, etc.

Alternately, it can return a RuntimeDefinedParameterDictionary instead.

The Cmdlet or CmdletProvider should hold on to a reference to the object which it returns from this method, since the argument values for the dynamic parameters specified by that object will be set in that object.

This method will be called after all formal (command-line) parameters are set, but before BeginProcessing() is called and before any incoming pipeline objects are read. Therefore, parameters which allow input from the pipeline may not be set at the time this method is called, even if the parameters are mandatory.

Applies to