ProcessResult<'T> Type
The full outcome of a run: the exit code as data, captured stdout/stderr, and timing. A non-zero exit is **not** an error here — inspect `Code`/`IsSuccess`, or call `ProcessResult.ensureSuccess` to convert a failure into a `ProcessError`. `'T` is the captured-stdout type: `string` for the text verbs, `byte[]` for the bytes verbs.
Instance members
| Instance member |
Description
|
|
The exit codes treated as success (from `Command.OkCodes`; `{0}` by default).
|
Full Usage:
this.Code
Returns: int option
|
The exit code, or `None` for a signal kill or timeout.
|
Full Usage:
this.Combined
Returns: string
|
The captured stdout and stderr joined into one string — stdout, then stderr on a new line when both are non-empty (for a `byte[]` stdout, UTF-8-decoded). Shares the exact join rule with `ProcessError.Combined`. This is a **post-hoc concatenation** of the two *separately* captured streams, so it does **not** reproduce their real terminal interleaving. For an honest, byte-for-byte `2>&1` view use `Command.MergeStderr`, which merges the streams at the OS level: the interleaved output then arrives on `Stdout` (and `Stderr` is empty, so `Combined` equals `Stdout`).
|
|
Wall-clock duration of the run.
|
|
Demand a successful run (an **accepted** exit code — one in `Command.OkCodes`, `{0}` by default): returns the result unchanged on success, otherwise the corresponding `ProcessError` (`Exit` / `Signalled` / `Timeout`). The instance form for C# fluency.
|
Full Usage:
this.IsSuccess
Returns: bool
|
True when the process exited with one of the accepted codes (`Command.OkCodes`; `{0}` by default).
|
Full Usage:
this.IsTimedOut
Returns: bool
|
True when the run was killed for exceeding its timeout.
|
|
How the run concluded.
|
Full Usage:
this.OutputContainsAny
Parameters:
string seq
Returns: bool
|
True when any of `needles` appears (case-insensitive, ordinal) in either captured stream — the "a specific non-zero exit is benign when a known stdout/stderr marker is present" idiom (e.g. a tool exiting 1 with `no changes` in its output). Each stream is searched independently, so a needle never matches across the stdout/stderr boundary; a null needle is skipped and an empty `needles` is `false`.
|
Full Usage:
this.Program
Returns: string
|
The program that was run.
|
Full Usage:
this.Signal
Returns: int option
|
The terminating signal, when known.
|
Full Usage:
this.Stderr
Returns: string
|
The captured stderr, as decoded text.
|
Full Usage:
this.Stdout
Returns: 'T
|
The captured stdout (decoded text or raw bytes, depending on the verb).
|
Full Usage:
this.Truncated
Returns: bool
|
True when the captured output was truncated by an output-buffer policy.
|
ProcessKit API Reference