Dela via


CmdletProvider Class

Definition

The base class for Cmdlet provider.

public ref class CmdletProvider abstract : System::Management::Automation::IResourceSupplier
public abstract class CmdletProvider : System.Management.Automation.IResourceSupplier
type CmdletProvider = class
    interface IResourceSupplier
Public MustInherit Class CmdletProvider
Implements IResourceSupplier
Inheritance
CmdletProvider
Derived
Implements

Remarks

Although it is possible to derive from this base class to implement a Cmdlet Provider, in most cases one should derive from ItemCmdletProvider, ContainerCmdletProvider, or NavigationCmdletProvider

Constructors

CmdletProvider()

Properties

AltItemSeparator

Gets the alternate item separator character for this provider.

Credential

Gets the credentials under which the operation should run.

CurrentPSTransaction

Gets an object that surfaces the current PowerShell transaction. When this object is disposed, PowerShell resets the active transaction.

DynamicParameters

The dynamic parameters object populated with the values as specified by the user.

Exclude

Gets the exclude wildcard patterns which is used to determine which items will be excluded when taking an action.

Filter

Gets the provider specific filter that was supplied by the caller.

Force

Gets the force property.

Host

Gets the host interaction APIs.

Include

Gets the include wildcard patterns which is used to determine which items will be included when taking an action.

InvokeCommand

Gets the instance of the command invocation APIs for the current runspace.

InvokeProvider

Gets the instance of the provider interface APIs for the current runspace.

ItemSeparator

Gets the default item separator character for this provider.

ProviderInfo

The information about the provider that is stored in the runspace on behalf of the provider.

PSDriveInfo

The drive information associated with the context of the current operation.

SessionState

Gets the instance of session state for the current runspace.

Stopping

Indicates whether stop has been requested on this provider.

Methods

GetResourceString(String, String)

Gets the resource string corresponding to baseName and resourceId from the current assembly. You should override this if you require a different behavior.

ShouldContinue(String, String, Boolean, Boolean)
ShouldContinue(String, String)
ShouldProcess(String, String, String, ShouldProcessReason)
ShouldProcess(String, String, String)
ShouldProcess(String, String)
ShouldProcess(String)
Start(ProviderInfo)

Gives the provider the opportunity to initialize itself.

StartDynamicParameters()

Gets an object that defines the additional parameters for the Start implementation for a provider.

Stop()

Called by session state when the provider is being removed.

StopProcessing()
ThrowTerminatingError(ErrorRecord)
TransactionAvailable()

Returns true if a transaction is available and active.

WriteDebug(String)
WriteError(ErrorRecord)
WriteInformation(InformationRecord)
WriteInformation(Object, String[])
WriteItemObject(Object, String, Boolean)

Writes an item to the output as a PSObject with extra data attached as notes.

WriteProgress(ProgressRecord)
WritePropertyObject(Object, String)

Writes a property object to the output as a PSObject with extra data attached as notes.

WriteSecurityDescriptorObject(ObjectSecurity, String)

Writes a Security Descriptor object to the output as a PSObject with extra data attached as notes.

WriteVerbose(String)
WriteWarning(String)

Applies to