Class EffectKey
- Namespace
- Cratis.Chronicle.Occurrences
- Assembly
- Cratis.Chronicle.dll
Identifies one effect across every attempt of an occurrence. Pass Value to external idempotent endpoints.
public sealed record EffectKey : IEquatable<EffectKey>
- Inheritance
-
EffectKey
- Implements
- Inherited Members
- Extension Methods
Constructors
EffectKey(OccurrenceId, EffectName, LeaseToken)
Identifies one effect across every attempt of an occurrence. Pass Value to external idempotent endpoints.
public EffectKey(OccurrenceId Occurrence, EffectName Name, LeaseToken WrittenBy)
Parameters
OccurrenceOccurrenceIdThe occurrence identity.
NameEffectNameThe stable effect name.
WrittenByLeaseTokenThe attempt writing the receipt; not part of equality.
Properties
Name
The stable effect name.
public EffectName Name { get; init; }
Property Value
Occurrence
The occurrence identity.
public OccurrenceId Occurrence { get; init; }
Property Value
Value
Gets the opaque, namespace-scoped external idempotency key.
public string Value { get; }
Property Value
WrittenBy
The attempt writing the receipt; not part of equality.
public LeaseToken WrittenBy { get; init; }
Property Value
Methods
Deconstruct(out OccurrenceId, out EffectName, out LeaseToken)
public void Deconstruct(out OccurrenceId Occurrence, out EffectName Name, out LeaseToken WrittenBy)
Parameters
OccurrenceOccurrenceIdNameEffectNameWrittenByLeaseToken
Equals(EffectKey?)
Compares occurrence and name, independently of the writing lease.
public bool Equals(EffectKey? other)
Parameters
otherEffectKeyThe other effect key.
Returns
- bool
Whether both identify the same effect.
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
GetHashCode()
public override int GetHashCode()
Returns
ToString()
public override string ToString()
Returns
Operators
operator ==(EffectKey?, EffectKey?)
public static bool operator ==(EffectKey? left, EffectKey? right)
Parameters
Returns
operator !=(EffectKey?, EffectKey?)
public static bool operator !=(EffectKey? left, EffectKey? right)