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

Key IdempotencyKey

The key that was refused.

ExistingSequenceNumber EventSequenceNumber

The sequence number of the event that holds the key.

StoredEventType EventType

The event type, with generation, of the stored event.

RequestedGeneration EventTypeGeneration

The generation of the event type that was requested.

Reason IdempotencyConflictReason

Why the key was refused.

IdempotencyKeyConflict(IdempotencyKeyConflict)

protected IdempotencyKeyConflict(IdempotencyKeyConflict original)

Parameters

original IdempotencyKeyConflict

Properties

EqualityContract

protected virtual Type EqualityContract { get; }

Property Value

Type

ExistingSequenceNumber

The sequence number of the event that holds the key.

public EventSequenceNumber ExistingSequenceNumber { get; init; }

Property Value

EventSequenceNumber

Key

The key that was refused.

public IdempotencyKey Key { get; init; }

Property Value

IdempotencyKey

Reason

Why the key was refused.

public IdempotencyConflictReason Reason { get; init; }

Property Value

IdempotencyConflictReason

RequestedGeneration

The generation of the event type that was requested.

public EventTypeGeneration RequestedGeneration { get; init; }

Property Value

EventTypeGeneration

StoredEventType

The event type, with generation, of the stored event.

public EventType StoredEventType { get; init; }

Property Value

EventType

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

Key IdempotencyKey
ExistingSequenceNumber EventSequenceNumber
StoredEventType EventType
RequestedGeneration EventTypeGeneration
Reason IdempotencyConflictReason

Equals(IdempotencyKeyConflict?)

public virtual bool Equals(IdempotencyKeyConflict? other)

Parameters

other IdempotencyKeyConflict

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

PrintMembers(StringBuilder)

protected virtual bool PrintMembers(StringBuilder builder)

Parameters

builder StringBuilder

Returns

bool

ToString()

public override string ToString()

Returns

string

Operators

operator ==(IdempotencyKeyConflict?, IdempotencyKeyConflict?)

public static bool operator ==(IdempotencyKeyConflict? left, IdempotencyKeyConflict? right)

Parameters

left IdempotencyKeyConflict
right IdempotencyKeyConflict

Returns

bool

operator !=(IdempotencyKeyConflict?, IdempotencyKeyConflict?)

public static bool operator !=(IdempotencyKeyConflict? left, IdempotencyKeyConflict? right)

Parameters

left IdempotencyKeyConflict
right IdempotencyKeyConflict

Returns

bool