Partager via


PSActivity.PrepareSession(ActivityImplementationContext) Method

Definition

The method for derived activities to customize the runspace of a System.Management.Automation.PowerShell instance that the runtime has prepared for them. If the command needs any workflow-specific information during this PrepareSession call, it should be stored in ActivityImplementationContext.WorkflowContext during the GetCommand preparation phase.

protected:
 virtual void PrepareSession(Microsoft::PowerShell::Activities::ActivityImplementationContext ^ implementationContext);
 virtual void PrepareSession(Microsoft::PowerShell::Activities::ActivityImplementationContext const & implementationContext);
protected virtual void PrepareSession (Microsoft.PowerShell.Activities.ActivityImplementationContext implementationContext);
abstract member PrepareSession : Microsoft.PowerShell.Activities.ActivityImplementationContext -> unit
override this.PrepareSession : Microsoft.PowerShell.Activities.ActivityImplementationContext -> unit
Protected Overridable Sub PrepareSession (implementationContext As ActivityImplementationContext)

Parameters

implementationContext
ActivityImplementationContext

The ActivityImplementationContext returned by the call to GetCommand.

Applies to