QHResult Structure

Builds a HRESULT value that is encoded as customer-defined. The value may be extracted only by implicit conversion to int. Also overrides ToString to display a hex-formatted error code with prepended severity letter.

Definition

Namespace: Quine.HRCatalog
Assembly: Quine.Schemas.Core (in Quine.Schemas.Core.dll) Version: 1.0.0+0ea0706914ee4edf2b0ed66bec3ab4d062a43b68
C#
public readonly struct QHResult : IEquatable<QHResult>
Inheritance
Object    ValueType    QHResult
Implements
IEquatableQHResult

Remarks

This struct uses the "customer-defined" bit to redistribute bits of "ordinary" HRESULT as follows: 16 bits for facility, 8 bits for code, the predefined S bit to indicate success/failure and the predefined X bit to indicate level (low / high). Valid values are thus 0 - 65535 for facility and 0 - 255 for code.

Properties

Methods

Equals(Object)
(Overrides ValueTypeEquals(Object))
Equals(QHResult) 
FromHResult Constructor from raw HRESULT value. Mainly used for easy decoding of HRESULTs that are part of the exception to determine whether the error is "critical" or not.
GetHashCode
(Overrides ValueTypeGetHashCode)
ToEventId Conversion to EventId that allows for 6 bits of additional data to be put in event id's flags (top two bits map severity).
ToString
(Overrides ValueTypeToString)

Operators

See Also