ProcessExitCode Struct

Represents a process exit code.

public readonly struct ProcessExitCode : IEquatable<ProcessExitCode>
Implements

Constructors

NameDescription
ProcessExitCode(int)Represents a process exit code.

ProcessExitCode(int)

ProcessExitCode.cs

Represents a process exit code.

public ProcessExitCode(int value)

Parameters

value int

Properties

NameDescription
IsSuccessGets a value indicating whether the process exited successfully.
ValueGets the numeric exit code value.

Gets a value indicating whether the process exited successfully.

public bool IsSuccess { get; }

Property value

bool

Gets the numeric exit code value.

public int Value { get; }

Property value

int

Methods

NameDescription
Equals(ProcessExitCode)Indicates whether the current object is equal to another object of the same type.
Equals(object?)Indicates whether this instance and a specified object are equal.
GetHashCode()Returns the hash code for this instance.
IsAnyOf(ReadOnlySpan<int>)Determines whether the exit code matches any of the expected values.
ToString()Returns the fully qualified type name of this instance.

Equals overloads

Equals(ProcessExitCode)

ProcessExitCode.cs

Indicates whether the current object is equal to another object of the same type.

public bool Equals(ProcessExitCode other)
Parameters
other ProcessExitCode
An object to compare with this object.
Returns

bool true if the current object is equal to the other parameter; otherwise, false.

Equals(object?)

ProcessExitCode.cs

Indicates whether this instance and a specified object are equal.

public override bool Equals(object? obj)
Parameters
obj object?
The object to compare with the current instance.
Returns

bool true if obj and this instance are the same type and represent the same value; otherwise, false.

GetHashCode()

ProcessExitCode.cs

Returns the hash code for this instance.

public override int GetHashCode()

Returns

int A 32-bit signed integer that is the hash code for this instance.

IsAnyOf(ReadOnlySpan<int>)

ProcessExitCode.cs

Determines whether the exit code matches any of the expected values.

public bool IsAnyOf(params scoped ReadOnlySpan<int> expectedValues)

Parameters

expectedValues ReadOnlySpan<int>
The expected exit code values.

Returns

bool true if the exit code matches any of the expected values; otherwise, false.

Returns the fully qualified type name of this instance.

public override string ToString()

Returns

string The fully qualified type name.

Operators

NameDescription
operator ==(ProcessExitCode, ProcessExitCode)
explicit operator ProcessExitCode(int)
implicit operator int(ProcessExitCode)
operator !=(ProcessExitCode, ProcessExitCode)

operator ==(ProcessExitCode, ProcessExitCode)

ProcessExitCode.cs
public static bool operator ==(ProcessExitCode left, ProcessExitCode right)

Parameters

left ProcessExitCode
right ProcessExitCode

Returns

bool

No documentation is available.

explicit operator ProcessExitCode(int)

ProcessExitCode.cs
public static explicit operator ProcessExitCode(int value)

Parameters

value int

Returns

ProcessExitCode

No documentation is available.

implicit operator int(ProcessExitCode)

ProcessExitCode.cs
public static implicit operator int(ProcessExitCode exitCode)

Parameters

exitCode ProcessExitCode

Returns

int

No documentation is available.

operator !=(ProcessExitCode, ProcessExitCode)

ProcessExitCode.cs
public static bool operator !=(ProcessExitCode left, ProcessExitCode right)

Parameters

left ProcessExitCode
right ProcessExitCode

Returns

bool

No documentation is available.