C# Class PowerShellHtmlConsole.PSRemoteHost

A sample implementation of the PSHost abstract class for console applications. Not all members are implemented. Those that are not implemented throw a NotImplementedException exception.
Inheritance: System.Management.Automation.Host.PSHost, IHostSupportsInteractiveSession
Datei anzeigen Open project: SzymonPobiega/PowerShellHtmlConsole Class Usage Examples

Public Methods

Method Description
EnterNestedPrompt ( ) : void

Instructs the host to interrupt the currently running pipeline and start a new nested input loop. Not implemented by this example class. The call fails with an exception.

ExitNestedPrompt ( ) : void

Instructs the host to exit the currently running input loop. Not implemented by this example class. The call fails with an exception.

NotifyBeginApplication ( ) : void

Notifies the host that the Windows PowerShell runtime is about to execute a legacy command-line application. Typically it is used to restore state that was changed by a child process after the child exits. This implementation does nothing and simply returns.

NotifyEndApplication ( ) : void

Notifies the host that the Windows PowerShell engine has completed the execution of a legacy command. Typically it is used to restore state that was changed by a child process after the child exits. This implementation does nothing and simply returns.

PSRemoteHost ( InputOutputBuffers buffers, IPSRemoteHostCallback callbacks ) : System
PopRunspace ( ) : void

Requests to close a PSSession.

PushRunspace ( System.Management.Automation.Runspaces.Runspace runspace ) : void

Requests to open a PSSession.

SetShouldExit ( int exitCode ) : void

Indicate to the host application that exit has been requested. Pass the exit code that the host application should use when exiting the process.

Method Details

EnterNestedPrompt() public method

Instructs the host to interrupt the currently running pipeline and start a new nested input loop. Not implemented by this example class. The call fails with an exception.
public EnterNestedPrompt ( ) : void
return void

ExitNestedPrompt() public method

Instructs the host to exit the currently running input loop. Not implemented by this example class. The call fails with an exception.
public ExitNestedPrompt ( ) : void
return void

NotifyBeginApplication() public method

Notifies the host that the Windows PowerShell runtime is about to execute a legacy command-line application. Typically it is used to restore state that was changed by a child process after the child exits. This implementation does nothing and simply returns.
public NotifyBeginApplication ( ) : void
return void

NotifyEndApplication() public method

Notifies the host that the Windows PowerShell engine has completed the execution of a legacy command. Typically it is used to restore state that was changed by a child process after the child exits. This implementation does nothing and simply returns.
public NotifyEndApplication ( ) : void
return void

PSRemoteHost() public method

public PSRemoteHost ( InputOutputBuffers buffers, IPSRemoteHostCallback callbacks ) : System
buffers InputOutputBuffers
callbacks IPSRemoteHostCallback
return System

PopRunspace() public method

Requests to close a PSSession.
public PopRunspace ( ) : void
return void

PushRunspace() public method

Requests to open a PSSession.
public PushRunspace ( System.Management.Automation.Runspaces.Runspace runspace ) : void
runspace System.Management.Automation.Runspaces.Runspace Runspace to use.
return void

SetShouldExit() public method

Indicate to the host application that exit has been requested. Pass the exit code that the host application should use when exiting the process.
public SetShouldExit ( int exitCode ) : void
exitCode int The exit code that the host application should use.
return void