Class EventMetadata

Namespace
Cratis.Chronicle.EventSequences
Assembly
Cratis.Chronicle.dll

Represents event metadata, without payload, generation, revisions or compliance release.

public record EventMetadata : IEquatable<EventMetadata>
Inheritance
EventMetadata
Implements
Inherited Members
Extension Methods

Constructors

EventMetadata(EventMetadata)

protected EventMetadata(EventMetadata original)

Parameters

original EventMetadata

EventMetadata(EventSequenceNumber, EventTypeId, EventSourceType, EventSourceId, EventStreamType, EventStreamId, DateTimeOffset, CorrelationId, IImmutableList<Causation>, ResolvedIdentity, InitiatorType, IImmutableList<Tag>, Subject, EventSourceName)

Represents event metadata, without payload, generation, revisions or compliance release.

public EventMetadata(EventSequenceNumber SequenceNumber, EventTypeId EventTypeId, EventSourceType EventSourceType, EventSourceId EventSourceId, EventStreamType EventStreamType, EventStreamId EventStreamId, DateTimeOffset Occurred, CorrelationId CorrelationId, IImmutableList<Causation> Causation, ResolvedIdentity CausedBy, InitiatorType InitiatorType, IImmutableList<Tag> Tags, Subject Subject, EventSourceName EventSourceName)

Parameters

SequenceNumber EventSequenceNumber

The locator within the event sequence.

EventTypeId EventTypeId

The event type identifier.

EventSourceType EventSourceType

The source type.

EventSourceId EventSourceId

The source identifier.

EventStreamType EventStreamType

The stream type.

EventStreamId EventStreamId

The stream identifier.

Occurred DateTimeOffset

When the event occurred.

CorrelationId CorrelationId

The correlation identifier.

Causation IImmutableList<Causation>

The causation chain.

CausedBy ResolvedIdentity

The current caused-by identity chain.

InitiatorType InitiatorType

The kind of initiator.

Tags IImmutableList<Tag>

The event tags.

Subject Subject

The compliance subject.

EventSourceName EventSourceName

The registered source name.

Fields

MaxLocators

The maximum number of requested locators, before deduplication.

public const int MaxLocators = 500

Field Value

int

Properties

Causation

The causation chain.

public IImmutableList<Causation> Causation { get; init; }

Property Value

IImmutableList<Causation>

CausedBy

The current caused-by identity chain.

public ResolvedIdentity CausedBy { get; init; }

Property Value

ResolvedIdentity

CorrelationId

The correlation identifier.

public CorrelationId CorrelationId { get; init; }

Property Value

CorrelationId

EqualityContract

protected virtual Type EqualityContract { get; }

Property Value

Type

EventSourceId

The source identifier.

public EventSourceId EventSourceId { get; init; }

Property Value

EventSourceId

EventSourceName

The registered source name.

public EventSourceName EventSourceName { get; init; }

Property Value

EventSourceName

EventSourceType

The source type.

public EventSourceType EventSourceType { get; init; }

Property Value

EventSourceType

EventStreamId

The stream identifier.

public EventStreamId EventStreamId { get; init; }

Property Value

EventStreamId

EventStreamType

The stream type.

public EventStreamType EventStreamType { get; init; }

Property Value

EventStreamType

EventTypeId

The event type identifier.

public EventTypeId EventTypeId { get; init; }

Property Value

EventTypeId

InitiatorType

The kind of initiator.

public InitiatorType InitiatorType { get; init; }

Property Value

InitiatorType

Occurred

When the event occurred.

public DateTimeOffset Occurred { get; init; }

Property Value

DateTimeOffset

SequenceNumber

The locator within the event sequence.

public EventSequenceNumber SequenceNumber { get; init; }

Property Value

EventSequenceNumber

Subject

The compliance subject.

public Subject Subject { get; init; }

Property Value

Subject

Tags

The event tags.

public IImmutableList<Tag> Tags { get; init; }

Property Value

IImmutableList<Tag>

Methods

Deconstruct(out EventSequenceNumber, out EventTypeId, out EventSourceType, out EventSourceId, out EventStreamType, out EventStreamId, out DateTimeOffset, out CorrelationId, out IImmutableList<Causation>, out ResolvedIdentity, out InitiatorType, out IImmutableList<Tag>, out Subject, out EventSourceName)

public void Deconstruct(out EventSequenceNumber SequenceNumber, out EventTypeId EventTypeId, out EventSourceType EventSourceType, out EventSourceId EventSourceId, out EventStreamType EventStreamType, out EventStreamId EventStreamId, out DateTimeOffset Occurred, out CorrelationId CorrelationId, out IImmutableList<Causation> Causation, out ResolvedIdentity CausedBy, out InitiatorType InitiatorType, out IImmutableList<Tag> Tags, out Subject Subject, out EventSourceName EventSourceName)

Parameters

SequenceNumber EventSequenceNumber
EventTypeId EventTypeId
EventSourceType EventSourceType
EventSourceId EventSourceId
EventStreamType EventStreamType
EventStreamId EventStreamId
Occurred DateTimeOffset
CorrelationId CorrelationId
Causation IImmutableList<Causation>
CausedBy ResolvedIdentity
InitiatorType InitiatorType
Tags IImmutableList<Tag>
Subject Subject
EventSourceName EventSourceName

Equals(EventMetadata?)

public virtual bool Equals(EventMetadata? other)

Parameters

other EventMetadata

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

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

Parameters

left EventMetadata
right EventMetadata

Returns

bool

operator !=(EventMetadata?, EventMetadata?)

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

Parameters

left EventMetadata
right EventMetadata

Returns

bool