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

original AppendCondition

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

Label string

The condition label.

EventSourceId EventSourceId

Optional source narrowing.

EventTypes IReadOnlyList<EventType>

Type-ID narrowing; empty means any type.

EventSourceType EventSourceType

Optional source type.

EventStreamType EventStreamType

Optional stream type.

EventStreamId EventStreamId

Optional stream identifier.

After EventSequenceNumber

The retained boundary.

ExpectsNoMatchingEvent bool

Whether no matching event may exist.

Origins IReadOnlyList<AppendConditionOrigin>

The dependencies supplying this condition.

Reads IReadOnlyList<string>

Descriptions of protected reads.

Properties

After

The retained boundary.

public EventSequenceNumber After { get; init; }

Property Value

EventSequenceNumber

EqualityContract

protected virtual Type EqualityContract { get; }

Property Value

Type

EventSourceId

Optional source narrowing.

public EventSourceId? EventSourceId { get; init; }

Property Value

EventSourceId

EventSourceType

Optional source type.

public EventSourceType? EventSourceType { get; init; }

Property Value

EventSourceType

EventStreamId

Optional stream identifier.

public EventStreamId? EventStreamId { get; init; }

Property Value

EventStreamId

EventStreamType

Optional stream type.

public EventStreamType? EventStreamType { get; init; }

Property Value

EventStreamType

EventTypes

Type-ID narrowing; empty means any type.

public IReadOnlyList<EventType> EventTypes { get; init; }

Property Value

IReadOnlyList<EventType>

ExpectsNoMatchingEvent

Whether no matching event may exist.

public bool ExpectsNoMatchingEvent { get; init; }

Property Value

bool

Label

The condition label.

public string Label { get; init; }

Property Value

string

Origins

The dependencies supplying this condition.

public IReadOnlyList<AppendConditionOrigin> Origins { get; init; }

Property Value

IReadOnlyList<AppendConditionOrigin>

Reads

Descriptions of protected reads.

public IReadOnlyList<string> Reads { get; init; }

Property Value

IReadOnlyList<string>

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

Label string
EventSourceId EventSourceId
EventTypes IReadOnlyList<EventType>
EventSourceType EventSourceType
EventStreamType EventStreamType
EventStreamId EventStreamId
After EventSequenceNumber
ExpectsNoMatchingEvent bool
Origins IReadOnlyList<AppendConditionOrigin>
Reads IReadOnlyList<string>

Equals(AppendCondition?)

public virtual bool Equals(AppendCondition? other)

Parameters

other AppendCondition

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 ==(AppendCondition?, AppendCondition?)

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

Parameters

left AppendCondition
right AppendCondition

Returns

bool

operator !=(AppendCondition?, AppendCondition?)

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

Parameters

left AppendCondition
right AppendCondition

Returns

bool