Skip to main content
Version: 0.9.0 (next)

ResultInfo struct

The outcome of a native call: a ResultInfo.StatusCode and a diagnostic message.

Namespace: Quaternar.Qaros · Assembly: Quaternar.Qaros.dll

public readonly struct ResultInfo : IEquatable<ResultInfo>

Implements: IEquatable<ResultInfo>

Remarks​

Some failures are expected control flow rather than errors, for example StatusCode.OnboardingSessionNotFound from a rejoin. Equality compares ResultInfo.StatusCode only; the message and ResultInfo.ErrorHandle are ignored.

Constructors​

ResultInfo(StatusCode, uint, string)​

public ResultInfo(StatusCode statusCode, uint errorHandle, string message)

Parameters

NameTypeDescription
statusCodeStatusCode
errorHandleuint
messagestring

Properties​

MemberDescription
StatusCode
ErrorHandleThe native diagnostic object behind a failure; 0 on success.
Message
IsSuccess

StatusCode​

public StatusCode StatusCode { get; }

Value: StatusCode

ErrorHandle​

The native diagnostic object behind a failure; 0 on success.

public uint ErrorHandle { get; }

Value: uint

Message​

public string Message { get; }

Value: string

IsSuccess​

public bool IsSuccess { get; }

Value: bool

Methods​

MemberDescription
EnsureSuccess()
ToString()Returns the fully qualified type name of this instance.
Equals(ResultInfo)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.

EnsureSuccess​

public void EnsureSuccess()

Exceptions

ExceptionCondition
NativeCallExceptionThe result is a failure.

ToString​

Returns the fully qualified type name of this instance.

public override string ToString()

Returns: string — The fully qualified type name.

Equals(ResultInfo)​

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

public bool Equals(ResultInfo other)

Parameters

NameTypeDescription
otherResultInfoAn object to compare with this object.

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

Equals(object?)​

Indicates whether this instance and a specified object are equal.

public override bool Equals(object? obj)

Parameters

NameTypeDescription
objobjectThe 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​

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.

Operators​

operator ==​

public static bool operator ==(ResultInfo left, ResultInfo right)

Parameters

NameTypeDescription
leftResultInfo
rightResultInfo

Returns: bool

operator !=​

public static bool operator !=(ResultInfo left, ResultInfo right)

Parameters

NameTypeDescription
leftResultInfo
rightResultInfo

Returns: bool