Class ClosesStreamConstraintDefinition
- Namespace
- Cratis.Chronicle.Events.Constraints
- Assembly
- Cratis.Chronicle.dll
Defines event-driven owned stream closures and exact reopening transitions.
public record ClosesStreamConstraintDefinition : IConstraintDefinition, IEquatable<ClosesStreamConstraintDefinition>
- Inheritance
-
ClosesStreamConstraintDefinition
- Implements
- Inherited Members
- Extension Methods
Remarks
Registration is not retroactive. A reindex preserves this owner's current rows when a redacted property-sourced closing or reopening event cannot be reconstructed from a closure snapshot. The kernel emits a structured warning and continues rebuilding other constraints.
Constructors
ClosesStreamConstraintDefinition(ClosesStreamConstraintDefinition)
protected ClosesStreamConstraintDefinition(ClosesStreamConstraintDefinition original)
Parameters
originalClosesStreamConstraintDefinition
ClosesStreamConstraintDefinition(ConstraintName, ConstraintViolationMessageProvider, IEnumerable<EventTypeId>, ClosedStreamDimensions, IEnumerable<EventTypeId>, string?)
Defines event-driven owned stream closures and exact reopening transitions.
public ClosesStreamConstraintDefinition(ConstraintName Name, ConstraintViolationMessageProvider MessageCallback, IEnumerable<EventTypeId> EventTypeIds, ClosedStreamDimensions Dimensions, IEnumerable<EventTypeId> ReopenedBy, string? EventStreamIdFrom = null)
Parameters
NameConstraintNameThe owning constraint name.
MessageCallbackConstraintViolationMessageProviderThe violation message callback.
EventTypeIdsIEnumerable<EventTypeId>The closing event types.
DimensionsClosedStreamDimensionsThe participating dimensions.
ReopenedByIEnumerable<EventTypeId>The reopening event types.
EventStreamIdFromstringThe optional payload property providing the stream identifier.
Remarks
Registration is not retroactive. A reindex preserves this owner's current rows when a redacted property-sourced closing or reopening event cannot be reconstructed from a closure snapshot. The kernel emits a structured warning and continues rebuilding other constraints.
Properties
Dimensions
The participating dimensions.
public ClosedStreamDimensions Dimensions { get; init; }
Property Value
EqualityContract
protected virtual Type EqualityContract { get; }
Property Value
EventSequences
Gets the event sequences this declaration applies to; empty means all sequences.
public IEnumerable<EventSequenceId> EventSequences { get; init; }
Property Value
EventStreamIdFrom
The optional payload property providing the stream identifier.
public string? EventStreamIdFrom { get; init; }
Property Value
EventTypeIds
The closing event types.
public IEnumerable<EventTypeId> EventTypeIds { get; init; }
Property Value
MessageCallback
The violation message callback.
public ConstraintViolationMessageProvider MessageCallback { get; init; }
Property Value
Name
The owning constraint name.
public ConstraintName Name { get; init; }
Property Value
ReopenedBy
The reopening event types.
public IEnumerable<EventTypeId> ReopenedBy { get; init; }
Property Value
Methods
Deconstruct(out ConstraintName, out ConstraintViolationMessageProvider, out IEnumerable<EventTypeId>, out ClosedStreamDimensions, out IEnumerable<EventTypeId>, out string?)
public void Deconstruct(out ConstraintName Name, out ConstraintViolationMessageProvider MessageCallback, out IEnumerable<EventTypeId> EventTypeIds, out ClosedStreamDimensions Dimensions, out IEnumerable<EventTypeId> ReopenedBy, out string? EventStreamIdFrom)
Parameters
NameConstraintNameMessageCallbackConstraintViolationMessageProviderEventTypeIdsIEnumerable<EventTypeId>DimensionsClosedStreamDimensionsReopenedByIEnumerable<EventTypeId>EventStreamIdFromstring
Equals(ClosesStreamConstraintDefinition?)
public virtual bool Equals(ClosesStreamConstraintDefinition? other)
Parameters
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 ==(ClosesStreamConstraintDefinition?, ClosesStreamConstraintDefinition?)
public static bool operator ==(ClosesStreamConstraintDefinition? left, ClosesStreamConstraintDefinition? right)
Parameters
Returns
operator !=(ClosesStreamConstraintDefinition?, ClosesStreamConstraintDefinition?)
public static bool operator !=(ClosesStreamConstraintDefinition? left, ClosesStreamConstraintDefinition? right)