ProcessResult Class
Describes the outcome of a run of IProcessRunner.RunAsync.
This type is not available in the netstandard and .NET Framework builds of Louis, as ProcessRunner is not.
public sealed class ProcessResultConstructors
| Name | Description |
|---|---|
| ProcessResult(string, int, string, string, TimeSpan) | Initializes a new instance of the ProcessResult class. |
ProcessResult(string, int, string, string, TimeSpan)
Available in: net10.0net11.0(not available in the other target frameworks of the package)
Initializes a new instance of the ProcessResult class.
public ProcessResult(string commandLine, int exitCode, string standardOutput, string standardError, TimeSpan elapsed)Parameters
commandLinestring- The command line of the process, for display.
exitCodeint- The exit code of the process.
standardOutputstring- The text the process wrote to its standard output.
standardErrorstring- The text the process wrote to its standard error.
elapsedTimeSpan- The time the run took.
Exceptions
ArgumentNullExceptioncommandLineisnull. - or -standardOutputisnull. - or -standardErrorisnull.
Properties
| Name | Description |
|---|---|
| CommandLine | Gets the command line of the process, for display. |
| Elapsed | Gets the time the run took. |
| ExitCode | Gets the exit code of the process. |
| StandardError | Gets the text the process wrote to its standard error. |
| StandardOutput | Gets the text the process wrote to its standard output. |
CommandLine
Available in: net10.0net11.0(not available in the other target frameworks of the package)
Gets the command line of the process, for display.
public string CommandLine { get; }Property value
string The executable and the arguments of the run, as CommandLineFormatter.Format shows them.
Elapsed
Available in: net10.0net11.0(not available in the other target frameworks of the package)
ExitCode
Available in: net10.0net11.0(not available in the other target frameworks of the package)
StandardError
Available in: net10.0net11.0(not available in the other target frameworks of the package)
Gets the text the process wrote to its standard error.
public string StandardError { get; }Property value
string An empty string when ProcessRunOptions.InheritStandardStreams is true; otherwise, every line the process wrote, each followed by Environment.NewLine, whatever line terminator the process wrote.
StandardOutput
Available in: net10.0net11.0(not available in the other target frameworks of the package)
Gets the text the process wrote to its standard output.
public string StandardOutput { get; }Property value
string An empty string when ProcessRunOptions.InheritStandardStreams is true; otherwise, every line the process wrote, each followed by Environment.NewLine, whatever line terminator the process wrote.