Class Event<TEvent>
- Namespace
- Stratara.Shared.EventSourcing
- Assembly
- Stratara.Shared.dll
Concrete implementation of IEvent<TEvent> that wraps a strongly-typed event payload together with the stream identity, version, and tenant / actor context required by the event store.
public sealed record Event<TEvent> : IEvent<TEvent>, IEvent, IEquatable<Event<TEvent>> where TEvent : notnull
Type Parameters
TEventCLR type of the wrapped event payload.
- Inheritance
-
Event<TEvent>
- Implements
-
IEvent<TEvent>IEquatable<Event<TEvent>>
- Inherited Members
- Extension Methods
Constructors
Event(Guid, long, TEvent, Guid, Guid, Guid, string)
Concrete implementation of IEvent<TEvent> that wraps a strongly-typed event payload together with the stream identity, version, and tenant / actor context required by the event store.
public Event(Guid Id, long Version, TEvent Data, Guid StreamId, Guid TenantId, Guid UserId, string AggregateTypeName = "Unknown")
Parameters
IdGuidStable event id (also the event-store row id).
VersionlongMonotonic version of the event within its stream.
DataTEventThe typed event payload.
StreamIdGuidId of the event stream / aggregate the event belongs to.
TenantIdGuidData-owner tenant the event belongs to.
UserIdGuidActor user id that produced the event (used in audit surfaces).
AggregateTypeNamestringCLR type name of the aggregate whose state the event mutates.
Properties
AggregateTypeName
CLR type name of the aggregate whose state the event mutates.
public string AggregateTypeName { get; init; }
Property Value
Data
The typed event payload.
public TEvent Data { get; init; }
Property Value
- TEvent
EventTypeName
Fully-qualified, version-independent type name of the event payload.
public string EventTypeName { get; }
Property Value
Id
Stable event id (also the event-store row id).
public Guid Id { get; init; }
Property Value
StreamId
Id of the event stream / aggregate the event belongs to.
public Guid StreamId { get; init; }
Property Value
TenantId
Data-owner tenant the event belongs to.
public Guid TenantId { get; init; }
Property Value
UserId
Actor user id that produced the event (used in audit surfaces).
public Guid UserId { get; init; }
Property Value
Version
Monotonic version of the event within its stream.
public long Version { get; init; }