Runs an external processes with redirected stdin, stdout and stderr steams.
More...
|
virtual string | Execute (params string[] arguments) |
| Runs the external process, processes its output and waits until it has terminated. More...
|
|
|
virtual ProcessStartInfo | GetStartInfo (params string[] arguments) |
| Creates the ProcessStartInfo used by Execute to launch the external application and redirect its input/output. More...
|
|
virtual void | InitStdin (StreamWriter writer) |
| A hook method for writing to the application's stdin right after startup. More...
|
|
virtual ? string | HandleStderr (string line) |
| A hook method for handling stderr messages from the CLI application. More...
|
|
|
abstract string | AppBinary [get] |
| The name of the application's binary (without a file extension). More...
|
|
Runs an external processes with redirected stdin, stdout and stderr steams.
◆ Execute()
virtual string NanoByte.Common.Streams.ChildProcess.Execute |
( |
params string[] |
arguments | ) |
|
|
inlinevirtual |
Runs the external process, processes its output and waits until it has terminated.
- Parameters
-
arguments | Command-line arguments to launch the application with. |
- Returns
- The application's complete stdout output.
- Exceptions
-
IOException | The external application could not be launched. |
◆ GetStartInfo()
virtual ProcessStartInfo NanoByte.Common.Streams.ChildProcess.GetStartInfo |
( |
params string[] |
arguments | ) |
|
|
inlineprotectedvirtual |
Creates the ProcessStartInfo used by Execute to launch the external application and redirect its input/output.
- Parameters
-
arguments | The arguments to pass to the process at startup. |
◆ HandleStderr()
virtual ? string NanoByte.Common.Streams.ChildProcess.HandleStderr |
( |
string |
line | ) |
|
|
inlineprotectedvirtual |
A hook method for handling stderr messages from the CLI application.
- Parameters
-
line | The line written to stderr. |
- Returns
- The response to write to stdin;
null
for none.
◆ InitStdin()
virtual void NanoByte.Common.Streams.ChildProcess.InitStdin |
( |
StreamWriter |
writer | ) |
|
|
inlineprotectedvirtual |
A hook method for writing to the application's stdin right after startup.
- Parameters
-
writer | The stream writer providing access to stdin. |
◆ AppBinary
abstract string NanoByte.Common.Streams.ChildProcess.AppBinary |
|
getprotected |
The name of the application's binary (without a file extension).
The documentation for this class was generated from the following file:
- Common/Streams/ChildProcess.cs