共用方式為


ContainerCmdletProvider.NewItemDynamicParameters Method

Definition

Gives the provider an opportunity to attach additional parameters to the new-item cmdlet.

protected:
 virtual System::Object ^ NewItemDynamicParameters(System::String ^ path, System::String ^ itemTypeName, System::Object ^ newItemValue);
protected:
 virtual Platform::Object ^ NewItemDynamicParameters(Platform::String ^ path, Platform::String ^ itemTypeName, Platform::Object ^ newItemValue);
 virtual winrt::Windows::Foundation::IInspectable NewItemDynamicParameters(std::wstring const & path, std::wstring const & itemTypeName, winrt::Windows::Foundation::IInspectable const & newItemValue);
protected virtual object NewItemDynamicParameters (string path, string itemTypeName, object newItemValue);
abstract member NewItemDynamicParameters : string * string * obj -> obj
override this.NewItemDynamicParameters : string * string * obj -> obj
Protected Overridable Function NewItemDynamicParameters (path As String, itemTypeName As String, newItemValue As Object) As Object

Parameters

path
String

If the path was specified on the command line, this is the path to the item to get the dynamic parameters for.

itemTypeName
String

The provider defined type of the item to create.

newItemValue
Object

This is a provider specific type that the provider can use to create a new instance of an item at the specified path.

Returns

Overrides of this method should return an object that has properties and fields decorated with parsing attributes similar to a cmdlet class or a RuntimeDefinedParameterDictionary.

The default implementation returns null. (no additional parameters)

Applies to