CommandBase

Namespace: AnyPackage.Commands.Internal

The base class for package and source commands.

public abstract class CommandBase : System.Management.Automation.PSCmdlet, System.Management.Automation.IDynamicParameters

Inheritance Object → InternalCommand → Cmdlet → PSCmdlet → CommandBase
Implements IDynamicParameters

Properties

Provider

Gets or sets the package provider.

public abstract string Provider { get; set; }

Property Value

String

Events

public PSEventManager Events { get; }

Property Value

PSEventManager

Host

public PSHost Host { get; }

Property Value

PSHost

InvokeCommand

public CommandInvocationIntrinsics InvokeCommand { get; }

Property Value

CommandInvocationIntrinsics

InvokeProvider

public ProviderIntrinsics InvokeProvider { get; }

Property Value

ProviderIntrinsics

JobManager

public JobManager JobManager { get; }

Property Value

JobManager

JobRepository

public JobRepository JobRepository { get; }

Property Value

JobRepository

MyInvocation

public InvocationInfo MyInvocation { get; }

Property Value

InvocationInfo

PagingParameters

public PagingParameters PagingParameters { get; }

Property Value

PagingParameters

ParameterSetName

public string ParameterSetName { get; }

Property Value

String

SessionState

public SessionState SessionState { get; }

Property Value

SessionState

CommandRuntime

public ICommandRuntime CommandRuntime { get; set; }

Property Value

ICommandRuntime

Stopping

public bool Stopping { get; }

Property Value

Boolean

CommandOrigin

public CommandOrigin CommandOrigin { get; }

Property Value

CommandOrigin

Methods

GetDynamicParameters()

Returns an instance of an object that defines dynamic parameters.

public object GetDynamicParameters()

Returns

Object

        This method should return an object with properties with parameter attributes or a RuntimeDefinedParameterDictionary.

BeginProcessing()

Initializes the command.

protected void BeginProcessing()

GetInstances(String)

Returns instances of a package provider.

protected IEnumerable<PackageProvider> GetInstances(string provider)

Parameters

provider String
Package provider name.

Returns

IEnumerable<PackageProvider>

        Returns instances of a package provider.