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
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
SessionState
public SessionState SessionState { get; }
Property Value
SessionState
CommandRuntime
public ICommandRuntime CommandRuntime { get; set; }
Property Value
ICommandRuntime
Stopping
public bool Stopping { get; }
Property Value
CommandOrigin
public CommandOrigin CommandOrigin { get; }
Property Value
CommandOrigin
Methods
GetDynamicParameters()
Returns an instance of an object that defines dynamic parameters.
public object GetDynamicParameters()
Returns
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
Returns instances of a package provider.