Table of Contents

Class ExecResult

Namespace
OpenShell
Assembly
OpenShell.Sdk.dll

The buffered result of a command.

public sealed record ExecResult : IEquatable<ExecResult>
Inheritance
ExecResult
Implements
Inherited Members

Constructors

ExecResult(int, ReadOnlyMemory<byte>, ReadOnlyMemory<byte>)

The buffered result of a command.

public ExecResult(int ExitCode, ReadOnlyMemory<byte> Stdout, ReadOnlyMemory<byte> Stderr)

Parameters

ExitCode int

The exit code of the command.

Stdout ReadOnlyMemory<byte>

Everything the command wrote to standard output.

Stderr ReadOnlyMemory<byte>

Everything the command wrote to standard error.

Properties

ExitCode

The exit code of the command.

public int ExitCode { get; init; }

Property Value

int

Stderr

Everything the command wrote to standard error.

public ReadOnlyMemory<byte> Stderr { get; init; }

Property Value

ReadOnlyMemory<byte>

StderrText

Standard error decoded as UTF-8.

public string StderrText { get; }

Property Value

string

Stdout

Everything the command wrote to standard output.

public ReadOnlyMemory<byte> Stdout { get; init; }

Property Value

ReadOnlyMemory<byte>

StdoutText

Standard output decoded as UTF-8.

public string StdoutText { get; }

Property Value

string

Succeeded

True when the command exited with code 0.

public bool Succeeded { get; }

Property Value

bool