Class DomainEvent
Namespace: Cephalon.Abstractions.EventSourcing
Assembly: Cephalon.Abstractions.dll
Provides a minimal record base for immutable domain events.
public abstract record DomainEvent : IDomainEvent, IEquatable<DomainEvent>Inheritance
Section titled “Inheritance”Implements
Section titled “Implements”IDomainEvent, IEquatable<DomainEvent>
Inherited Members
Section titled “Inherited Members”object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()
Constructors
Section titled “Constructors”DomainEvent(string, long, DateTime)
Section titled “ DomainEvent(string, long, DateTime)”Initializes a new instance of the
protected DomainEvent(string streamId, long streamVersion, DateTime occurredAtUtc)Parameters
Section titled “Parameters”streamId string
The stable stream identifier that owns the event.
streamVersion long
The optimistic stream version assigned to the event.
occurredAtUtc DateTime
The time at which the event occurred in UTC.
Properties
Section titled “Properties”OccurredAtUtc
Section titled “ OccurredAtUtc”Gets the time at which the event occurred in UTC.
public DateTime OccurredAtUtc { get; init; }Property Value
Section titled “Property Value”StreamId
Section titled “ StreamId”Gets the stable stream identifier that owns the event.
public string StreamId { get; init; }Property Value
Section titled “Property Value”StreamVersion
Section titled “ StreamVersion”Gets the optimistic stream version assigned to the event.
public long StreamVersion { get; init; }