C# Class JustAProgrammer.ADPR.ADPRHost

PSHost implementation for AppDomainPowerShellRunner.
Based on the msdn page Writing a Windows PowerShell Host Application
Inheritance: System.Management.Automation.Host.PSHost
ファイルを表示 Open project: zippy1981/AppDomainPoshRunner Class Usage Examples

Private Properties

Property Type Description
ADPRHost System

Public Methods

Method Description
EnterNestedPrompt ( ) : void

This API Instructs the host to interrupt the currently running pipeline and start a new nested input loop. In this example this functionality is not needed so the method throws a NotImplementedException exception.

ExitNestedPrompt ( ) : void

This API instructs the host to exit the currently running input loop. In this example this functionality is not needed so the method throws a NotImplementedException exception.

NotifyBeginApplication ( ) : void

This API is called before an external application process is started. Typically it is used to save state so that the parent can restore state that has been modified by a child process (after the child exits). In this example this functionality is not needed so the method returns nothing.

NotifyEndApplication ( ) : void

This API is called after an external application process finishes. Typically it is used to restore state that a child process has altered. In this example, this functionality is not needed so the method returns nothing.

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.

Private Methods

Method Description
ADPRHost ( ADPRState state ) : System

Method Details

EnterNestedPrompt() public method

This API Instructs the host to interrupt the currently running pipeline and start a new nested input loop. In this example this functionality is not needed so the method throws a NotImplementedException exception.
public EnterNestedPrompt ( ) : void
return void

ExitNestedPrompt() public method

This API instructs the host to exit the currently running input loop. In this example this functionality is not needed so the method throws a NotImplementedException exception.
public ExitNestedPrompt ( ) : void
return void

NotifyBeginApplication() public method

This API is called before an external application process is started. Typically it is used to save state so that the parent can restore state that has been modified by a child process (after the child exits). In this example this functionality is not needed so the method returns nothing.
public NotifyBeginApplication ( ) : void
return void

NotifyEndApplication() public method

This API is called after an external application process finishes. Typically it is used to restore state that a child process has altered. In this example, this functionality is not needed so the method returns nothing.
public NotifyEndApplication ( ) : void
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