Class ClosedStreamScope
- Namespace
- Cratis.Chronicle.EventSequences
- Assembly
- Cratis.Chronicle.dll
Identifies a nonempty subset of event dimensions to complete or inspect.
public record ClosedStreamScope : IEquatable<ClosedStreamScope>
- Inheritance
-
ClosedStreamScope
- Implements
- Inherited Members
- Extension Methods
Remarks
Unspecified event source values and empty stream values are treated as unset. All and Default stream values remain real dimensions, allowing a particular event source's default stream to be closed.
Constructors
ClosedStreamScope(ClosedStreamScope)
protected ClosedStreamScope(ClosedStreamScope original)
Parameters
originalClosedStreamScope
ClosedStreamScope(EventSourceId?, EventSourceType?, EventStreamType?, EventStreamId?)
Identifies a nonempty subset of event dimensions to complete or inspect.
public ClosedStreamScope(EventSourceId? EventSourceId = null, EventSourceType? EventSourceType = null, EventStreamType? EventStreamType = null, EventStreamId? EventStreamId = null)
Parameters
EventSourceIdEventSourceIdThe event source identifier, or null.
EventSourceTypeEventSourceTypeThe event source type, or null.
EventStreamTypeEventStreamTypeThe stream type, or null.
EventStreamIdEventStreamIdThe stream identifier, or null.
Remarks
Unspecified event source values and empty stream values are treated as unset. All and Default stream values remain real dimensions, allowing a particular event source's default stream to be closed.
Properties
EqualityContract
protected virtual Type EqualityContract { get; }
Property Value
EventSourceId
The event source identifier, or null.
public EventSourceId? EventSourceId { get; init; }
Property Value
EventSourceType
The event source type, or null.
public EventSourceType? EventSourceType { get; init; }
Property Value
EventStreamId
The stream identifier, or null.
public EventStreamId? EventStreamId { get; init; }
Property Value
EventStreamType
The stream type, or null.
public EventStreamType? EventStreamType { get; init; }
Property Value
IsEmpty
Gets whether the scope has no participating dimensions.
public bool IsEmpty { get; }
Property Value
Methods
Deconstruct(out EventSourceId?, out EventSourceType?, out EventStreamType?, out EventStreamId?)
public void Deconstruct(out EventSourceId? EventSourceId, out EventSourceType? EventSourceType, out EventStreamType? EventStreamType, out EventStreamId? EventStreamId)
Parameters
EventSourceIdEventSourceIdEventSourceTypeEventSourceTypeEventStreamTypeEventStreamTypeEventStreamIdEventStreamId
Equals(ClosedStreamScope?)
public virtual bool Equals(ClosedStreamScope? other)
Parameters
otherClosedStreamScope
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
ForEventSource(EventSourceId)
Create a scope covering all streams of one event source.
public static ClosedStreamScope ForEventSource(EventSourceId eventSourceId)
Parameters
eventSourceIdEventSourceIdThe event source identifier.
Returns
- ClosedStreamScope
The scope.
ForStream(EventStreamType, EventStreamId)
Create a stream-type and stream-identifier scope.
public static ClosedStreamScope ForStream(EventStreamType eventStreamType, EventStreamId eventStreamId)
Parameters
eventStreamTypeEventStreamTypeThe stream type.
eventStreamIdEventStreamIdThe stream identifier.
Returns
- ClosedStreamScope
The scope.
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 ==(ClosedStreamScope?, ClosedStreamScope?)
public static bool operator ==(ClosedStreamScope? left, ClosedStreamScope? right)
Parameters
leftClosedStreamScoperightClosedStreamScope
Returns
operator !=(ClosedStreamScope?, ClosedStreamScope?)
public static bool operator !=(ClosedStreamScope? left, ClosedStreamScope? right)
Parameters
leftClosedStreamScoperightClosedStreamScope