C# Class PowerShellHtmlConsole.PSWrapper

Inheritance: IPSRemoteHostCallback, IDisposable
显示文件 Open project: SzymonPobiega/PowerShellHtmlConsole Class Usage Examples

Public Methods

Method Description
Dispose ( ) : void
Exit ( int code ) : void
PSWrapper ( InputOutputBuffers buffers, System.Action exitCallback ) : System
TryExecute ( string cmd ) : void

Private Methods

Method Description
Execute ( string cmd ) : void
ReportException ( Exception e ) : void

To display an exception using the display formatter, run a second pipeline passing in the error record. The runtime will bind this to the $input variable, which is why $input is being piped to the Out-String cmdlet. The WriteErrorLine method is called to make sure the error gets displayed in the correct error color.

Method Details

Dispose() public method

public Dispose ( ) : void
return void

Exit() public method

public Exit ( int code ) : void
code int
return void

PSWrapper() public method

public PSWrapper ( InputOutputBuffers buffers, System.Action exitCallback ) : System
buffers InputOutputBuffers
exitCallback System.Action
return System

TryExecute() public method

public TryExecute ( string cmd ) : void
cmd string
return void