Table of Contents

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

ulong

Invalid

The invalid id.

public static DiagnosticId Invalid { get; }

Property Value

DiagnosticId

IsValid

True if not Invalid.

public bool IsValid { get; }

Property Value

bool

Methods

Create()

Allocate a new id from the global allocator.

public static DiagnosticId Create()

Returns

DiagnosticId

Equals(DiagnosticId)

Value-based equality.

public bool Equals(DiagnosticId other)

Parameters

other DiagnosticId

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

ToString()

public override string ToString()

Returns

string

Operators

operator ==(DiagnosticId, DiagnosticId)

Value-based equality.

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

Parameters

left DiagnosticId
right DiagnosticId

Returns

bool

operator !=(DiagnosticId, DiagnosticId)

Value-based equality.

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

Parameters

left DiagnosticId
right DiagnosticId

Returns

bool