ExecResult Class

The result of a command executed inside a container.

public sealed class ExecResult : IEquatable<ExecResult>
Implements

Constructors

NameDescription
ExecResult(int, string, string)The result of a command executed inside a container.

ExecResult(int, string, string)

ExecResult.cs

The result of a command executed inside a container.

public ExecResult(int ExitCode, string StandardOutput, string StandardError)

Parameters

ExitCode int
The command exit code.
StandardOutput string
The captured standard output.
StandardError string
The captured standard error.

Properties

NameDescription
ExitCodeThe command exit code.
StandardErrorThe captured standard error.
StandardOutputThe captured standard output.

The command exit code.

public int ExitCode { get; init; }

Property value

int

StandardError

ExecResult.cs

The captured standard error.

public string StandardError { get; init; }

Property value

string

StandardOutput

ExecResult.cs

The captured standard output.

public string StandardOutput { get; init; }

Property value

string

Methods

NameDescription
Deconstruct(int, string, string)
EnsureSuccess()Throws when the command exited with a non-zero exit code.
Equals(ExecResult?)
Equals(object?)
GetHashCode()
ToString()

Deconstruct(int, string, string)

public void Deconstruct(out int ExitCode, out string StandardOutput, out string StandardError)

Parameters

ExitCode int
StandardOutput string
StandardError string

No documentation is available.

EnsureSuccess()

ExecResult.cs

Throws when the command exited with a non-zero exit code.

public ExecResult EnsureSuccess()

Returns

ExecResult This instance, so the call can be chained.

Exceptions

ContainerExecException
The exit code is not 0. The message includes the standard error.

Equals overloads

Equals(ExecResult?)

public bool Equals(ExecResult? other)
Parameters
other ExecResult?
Returns

bool

No documentation is available.

Equals(object?)

public override bool Equals(object? obj)
Parameters
obj object?
Returns

bool

No documentation is available.

GetHashCode()

public override int GetHashCode()

Returns

int

No documentation is available.

ToString()

public override string ToString()

Returns

string

No documentation is available.

Operators

NameDescription
operator ==(ExecResult?, ExecResult?)
operator !=(ExecResult?, ExecResult?)

operator ==(ExecResult?, ExecResult?)

public static bool operator ==(ExecResult? left, ExecResult? right)

Parameters

left ExecResult?
right ExecResult?

Returns

bool

No documentation is available.

operator !=(ExecResult?, ExecResult?)

public static bool operator !=(ExecResult? left, ExecResult? right)

Parameters

left ExecResult?
right ExecResult?

Returns

bool

No documentation is available.