Class IdempotencyKeyConflict
- Namespace
- Cratis.Chronicle.EventSequences
- Assembly
- Cratis.Chronicle.dll
Represents an idempotency key that was refused because it already identifies a different event.
public record IdempotencyKeyConflict : IEquatable<IdempotencyKeyConflict>
- Inheritance
-
IdempotencyKeyConflict
- Implements
- Inherited Members
- Extension Methods
Constructors
IdempotencyKeyConflict(IdempotencyKey, EventSequenceNumber, EventType, EventTypeGeneration, IdempotencyConflictReason)
Represents an idempotency key that was refused because it already identifies a different event.
public IdempotencyKeyConflict(IdempotencyKey Key, EventSequenceNumber ExistingSequenceNumber, EventType StoredEventType, EventTypeGeneration RequestedGeneration, IdempotencyConflictReason Reason)
Parameters
KeyIdempotencyKeyThe key that was refused.
ExistingSequenceNumberEventSequenceNumberThe sequence number of the event that holds the key.
StoredEventTypeEventTypeThe event type, with generation, of the stored event.
RequestedGenerationEventTypeGenerationThe generation of the event type that was requested.
ReasonIdempotencyConflictReasonWhy the key was refused.
IdempotencyKeyConflict(IdempotencyKeyConflict)
protected IdempotencyKeyConflict(IdempotencyKeyConflict original)
Parameters
originalIdempotencyKeyConflict
Properties
EqualityContract
protected virtual Type EqualityContract { get; }
Property Value
ExistingSequenceNumber
The sequence number of the event that holds the key.
public EventSequenceNumber ExistingSequenceNumber { get; init; }
Property Value
Key
The key that was refused.
public IdempotencyKey Key { get; init; }
Property Value
Reason
Why the key was refused.
public IdempotencyConflictReason Reason { get; init; }
Property Value
RequestedGeneration
The generation of the event type that was requested.
public EventTypeGeneration RequestedGeneration { get; init; }
Property Value
StoredEventType
The event type, with generation, of the stored event.
public EventType StoredEventType { get; init; }
Property Value
Methods
Deconstruct(out IdempotencyKey, out EventSequenceNumber, out EventType, out EventTypeGeneration, out IdempotencyConflictReason)
public void Deconstruct(out IdempotencyKey Key, out EventSequenceNumber ExistingSequenceNumber, out EventType StoredEventType, out EventTypeGeneration RequestedGeneration, out IdempotencyConflictReason Reason)
Parameters
KeyIdempotencyKeyExistingSequenceNumberEventSequenceNumberStoredEventTypeEventTypeRequestedGenerationEventTypeGenerationReasonIdempotencyConflictReason
Equals(IdempotencyKeyConflict?)
public virtual bool Equals(IdempotencyKeyConflict? other)
Parameters
otherIdempotencyKeyConflict
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
GetHashCode()
public override int GetHashCode()
Returns
PrintMembers(StringBuilder)
protected virtual bool PrintMembers(StringBuilder builder)
Parameters
builderStringBuilder
Returns
ToString()
public override string ToString()
Returns
Operators
operator ==(IdempotencyKeyConflict?, IdempotencyKeyConflict?)
public static bool operator ==(IdempotencyKeyConflict? left, IdempotencyKeyConflict? right)
Parameters
leftIdempotencyKeyConflictrightIdempotencyKeyConflict
Returns
operator !=(IdempotencyKeyConflict?, IdempotencyKeyConflict?)
public static bool operator !=(IdempotencyKeyConflict? left, IdempotencyKeyConflict? right)
Parameters
leftIdempotencyKeyConflictrightIdempotencyKeyConflict