C# Class PsTest.PipelineWrapper

Represents the base functionality of a pipeline that can be used to invoke commands.
Pipelines are created within the context of a runspace. Pipelines can be created using the following methods: IRunspace.CreatePipeline: Overloaded method that can be used to create a pipeline or to create a pipeline with a valid command string. IRunspace.CreateNestedPipeline: Overloaded method that can be used to create a nested pipeline or to create a nested pipeline with a valid command string.
Inheritance: IPipeline
Datei anzeigen Open project: knutkj/pstest Class Usage Examples

Private Properties

Property Type Description

Public Methods

Method Description
Invoke ( ) : Collection

Invokes the pipeline synchronously.

When this method is used to invoke the pipeline, the Windows PowerShell runtime closes the Input pipe. This method cannot be called when another pipeline is running. This method cannot be called multiple times on a given pipeline. The state of the pipeline must be NotStarted when Invoke is called. When this method is called, it changes the state of the pipeline to Running. When Invoke is completed, it changes the state of the pipeline to one of following: Completed: The pipeline state is Completed if the pipeline invocation completed successfully. Failed: The pipeline state is Failed if the pipeline invocation failed or one of the commands in the pipeline threw a terminating error. Stopped: The pipeline state is Stopped if the pipeline was stopped by calling Stop or StopAsync. Applications can get notified about pipeline state changes by registering for the StateChanged event. This event is raised each time the state of the pipeline changes.

PipelineWrapper ( System.Management.Automation.Runspaces.Pipeline pipeline ) : System

Initializes a new instance of pipeline wrapper wrapping the specified pipeline.

Method Details

Invoke() public method

Invokes the pipeline synchronously.
When this method is used to invoke the pipeline, the Windows PowerShell runtime closes the Input pipe. This method cannot be called when another pipeline is running. This method cannot be called multiple times on a given pipeline. The state of the pipeline must be NotStarted when Invoke is called. When this method is called, it changes the state of the pipeline to Running. When Invoke is completed, it changes the state of the pipeline to one of following: Completed: The pipeline state is Completed if the pipeline invocation completed successfully. Failed: The pipeline state is Failed if the pipeline invocation failed or one of the commands in the pipeline threw a terminating error. Stopped: The pipeline state is Stopped if the pipeline was stopped by calling Stop or StopAsync. Applications can get notified about pipeline state changes by registering for the StateChanged event. This event is raised each time the state of the pipeline changes.
public Invoke ( ) : Collection
return Collection

PipelineWrapper() public method

Initializes a new instance of pipeline wrapper wrapping the specified pipeline.
public PipelineWrapper ( System.Management.Automation.Runspaces.Pipeline pipeline ) : System
pipeline System.Management.Automation.Runspaces.Pipeline /// The pipeline to wrap. ///
return System