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
Afficher le fichier Open project: knutkj/pstest Class Usage Examples

Private Properties

Свойство Type Description

Méthodes publiques

Méthode 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 méthode

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
Résultat Collection

PipelineWrapper() public méthode

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. ///
Résultat System