C# Class PsTest.RunspaceWrapper

Represents the runspace that is the operating environment for command pipelines. This class provides methods for opening the runspace, creating single and nested pipelines for the runspace, and closing the runspace.
Inheritance: IRunspace
Show file Open project: knutkj/pstest

Private Properties

Property Type Description

Public Methods

Method Description
CreateNestedPipeline ( string command, bool addToHistory ) : IPipeline

Creates a pipeline for the runspace while an existing pipeline is executing. This method also specifies the commands (such as cmdlets and scripts) that can be executed by the pipeline and specifies a Boolean value that indicates that pipeline execution is added to the history of the runspace.

RunspaceWrapper ( System.Management.Automation.Runspaces.Runspace runspace ) : System

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

Method Details

CreateNestedPipeline() public method

Creates a pipeline for the runspace while an existing pipeline is executing. This method also specifies the commands (such as cmdlets and scripts) that can be executed by the pipeline and specifies a Boolean value that indicates that pipeline execution is added to the history of the runspace.
public CreateNestedPipeline ( string command, bool addToHistory ) : IPipeline
command string /// Cmdlets, scripts, native applications, executables, or files /// available to the runspace through the pipeline. ///
addToHistory bool /// true indicates that pipeline execution is added to the /// history of the runspace; otherwise false is returned. ///
return IPipeline

RunspaceWrapper() public method

Initializes a new instance of a runspace wrapper wrapping the specified runspace.
public RunspaceWrapper ( System.Management.Automation.Runspaces.Runspace runspace ) : System
runspace System.Management.Automation.Runspaces.Runspace /// The runspace to wrap. ///
return System