Class CausationId
Default implementation of ICausationId.
public sealed class CausationId : ICausationId, IEquatable<CausationId>
- Inheritance
-
CausationId
- Implements
- Inherited Members
- Extension Methods
Constructors
CausationId()
Initializes a new instance of the CausationId class with a new GUID value.
public CausationId()
CausationId(Guid)
Initializes a new instance of the CausationId class with the specified GUID value.
public CausationId(Guid value)
Parameters
valueGuidThe GUID value for the causation identifier.
CausationId(string?)
Initializes a new instance of the CausationId class with the specified string value.
public CausationId(string? value)
Parameters
valuestringThe string representation of the GUID value.
Exceptions
- ArgumentException
Thrown when the value is null or whitespace.
- FormatException
Thrown when the value cannot be parsed as a GUID.
Properties
Value
Gets or sets the causation identifier value.
public Guid Value { get; set; }
Property Value
- Guid
The GUID linking the current operation to its cause.
Methods
Equals(CausationId?)
Determines whether the specified CausationId is equal to the current instance.
public bool Equals(CausationId? other)
Parameters
otherCausationIdThe CausationId to compare.
Returns
- bool
true if the specified CausationId is equal to the current instance; otherwise, false.
Equals(object?)
Determines whether the specified object is equal to the current instance.
public override bool Equals(object? obj)
Parameters
objobjectThe object to compare.
Returns
- bool
true if the specified object is equal to the current instance; otherwise, false.
GetHashCode()
Returns the hash code for this instance.
public override int GetHashCode()
Returns
- int
A 32-bit signed integer hash code.
ToString()
Represents a globally unique identifier (GUID).
public override string ToString()