Class AppendCondition
- Namespace
- Cratis.Chronicle.Transactions
- Assembly
- Cratis.Chronicle.dll
Describes a resolved condition validated atomically with an append.
public record AppendCondition : IEquatable<AppendCondition>
- Inheritance
-
AppendCondition
- Implements
- Inherited Members
- Extension Methods
Constructors
AppendCondition(AppendCondition)
protected AppendCondition(AppendCondition original)
Parameters
originalAppendCondition
AppendCondition(string, EventSourceId?, IReadOnlyList<EventType>, EventSourceType?, EventStreamType?, EventStreamId?, EventSequenceNumber, bool, IReadOnlyList<AppendConditionOrigin>, IReadOnlyList<string>)
Describes a resolved condition validated atomically with an append.
public AppendCondition(string Label, EventSourceId? EventSourceId, IReadOnlyList<EventType> EventTypes, EventSourceType? EventSourceType, EventStreamType? EventStreamType, EventStreamId? EventStreamId, EventSequenceNumber After, bool ExpectsNoMatchingEvent, IReadOnlyList<AppendConditionOrigin> Origins, IReadOnlyList<string> Reads)
Parameters
LabelstringThe condition label.
EventSourceIdEventSourceIdOptional source narrowing.
EventTypesIReadOnlyList<EventType>Type-ID narrowing; empty means any type.
EventSourceTypeEventSourceTypeOptional source type.
EventStreamTypeEventStreamTypeOptional stream type.
EventStreamIdEventStreamIdOptional stream identifier.
AfterEventSequenceNumberThe retained boundary.
ExpectsNoMatchingEventboolWhether no matching event may exist.
OriginsIReadOnlyList<AppendConditionOrigin>The dependencies supplying this condition.
ReadsIReadOnlyList<string>Descriptions of protected reads.
Properties
After
The retained boundary.
public EventSequenceNumber After { get; init; }
Property Value
EqualityContract
protected virtual Type EqualityContract { get; }
Property Value
EventSourceId
Optional source narrowing.
public EventSourceId? EventSourceId { get; init; }
Property Value
EventSourceType
Optional source type.
public EventSourceType? EventSourceType { get; init; }
Property Value
EventStreamId
Optional stream identifier.
public EventStreamId? EventStreamId { get; init; }
Property Value
EventStreamType
Optional stream type.
public EventStreamType? EventStreamType { get; init; }
Property Value
EventTypes
Type-ID narrowing; empty means any type.
public IReadOnlyList<EventType> EventTypes { get; init; }
Property Value
ExpectsNoMatchingEvent
Whether no matching event may exist.
public bool ExpectsNoMatchingEvent { get; init; }
Property Value
Label
The condition label.
public string Label { get; init; }
Property Value
Origins
The dependencies supplying this condition.
public IReadOnlyList<AppendConditionOrigin> Origins { get; init; }
Property Value
Reads
Descriptions of protected reads.
public IReadOnlyList<string> Reads { get; init; }
Property Value
Methods
Deconstruct(out string, out EventSourceId?, out IReadOnlyList<EventType>, out EventSourceType?, out EventStreamType?, out EventStreamId?, out EventSequenceNumber, out bool, out IReadOnlyList<AppendConditionOrigin>, out IReadOnlyList<string>)
public void Deconstruct(out string Label, out EventSourceId? EventSourceId, out IReadOnlyList<EventType> EventTypes, out EventSourceType? EventSourceType, out EventStreamType? EventStreamType, out EventStreamId? EventStreamId, out EventSequenceNumber After, out bool ExpectsNoMatchingEvent, out IReadOnlyList<AppendConditionOrigin> Origins, out IReadOnlyList<string> Reads)
Parameters
LabelstringEventSourceIdEventSourceIdEventTypesIReadOnlyList<EventType>EventSourceTypeEventSourceTypeEventStreamTypeEventStreamTypeEventStreamIdEventStreamIdAfterEventSequenceNumberExpectsNoMatchingEventboolOriginsIReadOnlyList<AppendConditionOrigin>ReadsIReadOnlyList<string>
Equals(AppendCondition?)
public virtual bool Equals(AppendCondition? other)
Parameters
otherAppendCondition
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 ==(AppendCondition?, AppendCondition?)
public static bool operator ==(AppendCondition? left, AppendCondition? right)
Parameters
leftAppendConditionrightAppendCondition
Returns
operator !=(AppendCondition?, AppendCondition?)
public static bool operator !=(AppendCondition? left, AppendCondition? right)
Parameters
leftAppendConditionrightAppendCondition