메소드 | 설명 | |
---|---|---|
ProcessIoManager ( |
Initializes a new instance of the ProcessIoManager class. Does not automatically start listening for stdout/stderr. Call StartProcessOutputRead() to begin listening for process output. |
|
StartProcessOutputRead ( ) : void |
Starts the background threads reading any output produced (standard output, standard error) that is produces by the running process.
|
|
StopMonitoringProcessOutput ( ) : void |
Stops both the standard input and stardard error background reader threads (via the Abort() method)
|
|
WriteStdin ( string text ) : void |
Writes the supplied text string to the standard input (stdin) of the running process In order to be able to write to the Process, the StartInfo.RedirectStandardInput must be set to true. |
메소드 | 설명 | |
---|---|---|
CheckForValidProcess ( string errorMessageText, bool checkForHasExited ) : void |
Checks for valid (non-null Process), and optionally check to see if the process has exited. Throws Exception if process is null, or if process has existed and checkForHasExited is true.
|
|
NotifyAndFlushBufferText ( StringBuilder textbuffer, bool isstdout ) : void |
Invokes the OnStdoutTextRead (if isstdout==true)/ OnStderrTextRead events with the supplied streambuilder 'textbuffer', then clears textbuffer after event is invoked.
|
|
ReadStandardErrorThreadMethod ( ) : void |
Method started in a background thread (stderrThread) to manage the reading and reporting of standard error text produced by the running process.
|
|
ReadStandardOutputThreadMethod ( ) : void |
Method started in a background thread (stdoutThread) to manage the reading and reporting of standard output text produced by the running process.
|
|
ReadStream ( int firstCharRead, |
Read characters from the supplied stream, and accumulate them in the 'streambuffer' variable until there are no more characters to read.
|
|
Time_Tick ( object sender, |
public ProcessIoManager ( |
||
process | The process. | |
리턴 | System |
public WriteStdin ( string text ) : void | ||
text | string | The text to write to running process input stream. |
리턴 | void |