Struct DiagnosticId
- Namespace
- MarymoorStudios.Core.Promises
- Assembly
- MarymoorStudios.Core.Promises.dll
A unique id for diagnostic purposes.
[DataContract]
public readonly struct DiagnosticId : IEquatable<DiagnosticId>
- Implements
- Inherited Members
Remarks
DiagnosticIds are unique only within the scope of the Sip that allocated them. Different Sips may reuse the same DiagnosticIds.
Constructors
DiagnosticId(ulong)
public DiagnosticId(ulong id)
Parameters
id
ulong
Properties
Id
The underlying value.
[DataMember]
public ulong Id { get; }
Property Value
Invalid
The invalid id.
public static DiagnosticId Invalid { get; }
Property Value
IsValid
True if not Invalid.
public bool IsValid { get; }
Property Value
Methods
Create()
Allocate a new id from the global allocator.
public static DiagnosticId Create()
Returns
Equals(DiagnosticId)
Value-based equality.
public bool Equals(DiagnosticId other)
Parameters
other
DiagnosticId
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
obj
object
Returns
GetHashCode()
public override int GetHashCode()
Returns
ToString()
public override string ToString()
Returns
Operators
operator ==(DiagnosticId, DiagnosticId)
Value-based equality.
public static bool operator ==(DiagnosticId left, DiagnosticId right)
Parameters
left
DiagnosticIdright
DiagnosticId
Returns
operator !=(DiagnosticId, DiagnosticId)
Value-based equality.
public static bool operator !=(DiagnosticId left, DiagnosticId right)
Parameters
left
DiagnosticIdright
DiagnosticId