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

original ClosedStreamScope

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

EventSourceId EventSourceId

The event source identifier, or null.

EventSourceType EventSourceType

The event source type, or null.

EventStreamType EventStreamType

The stream type, or null.

EventStreamId EventStreamId

The 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

Type

EventSourceId

The event source identifier, or null.

public EventSourceId? EventSourceId { get; init; }

Property Value

EventSourceId

EventSourceType

The event source type, or null.

public EventSourceType? EventSourceType { get; init; }

Property Value

EventSourceType

EventStreamId

The stream identifier, or null.

public EventStreamId? EventStreamId { get; init; }

Property Value

EventStreamId

EventStreamType

The stream type, or null.

public EventStreamType? EventStreamType { get; init; }

Property Value

EventStreamType

IsEmpty

Gets whether the scope has no participating dimensions.

public bool IsEmpty { get; }

Property Value

bool

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

EventSourceId EventSourceId
EventSourceType EventSourceType
EventStreamType EventStreamType
EventStreamId EventStreamId

Equals(ClosedStreamScope?)

public virtual bool Equals(ClosedStreamScope? other)

Parameters

other ClosedStreamScope

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

ForEventSource(EventSourceId)

Create a scope covering all streams of one event source.

public static ClosedStreamScope ForEventSource(EventSourceId eventSourceId)

Parameters

eventSourceId EventSourceId

The 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

eventStreamType EventStreamType

The stream type.

eventStreamId EventStreamId

The stream identifier.

Returns

ClosedStreamScope

The scope.

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

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

Parameters

left ClosedStreamScope
right ClosedStreamScope

Returns

bool

operator !=(ClosedStreamScope?, ClosedStreamScope?)

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

Parameters

left ClosedStreamScope
right ClosedStreamScope

Returns

bool