Class DomainEvent
Represents a domain event in the system.
Implements
Inherited Members
Namespace: Innovt.Domain.Core.Events
Assembly: Innovt.Domain.Core.dll
Syntax
public abstract class DomainEvent : IDataStream
Constructors
| Edit this page View SourceDomainEvent(string, string?)
Initializes a new instance of the DomainEvent class with a specified name and partition. The default version here is 1.0.0
Declaration
protected DomainEvent(string name, string? partition)
Parameters
Type | Name | Description |
---|---|---|
string | name | The name of the domain event. |
string | partition | The partition associated with the event. |
DomainEvent(string, string, string?)
Initializes a new instance of the DomainEvent class with a specified name, version, and partition.
Declaration
protected DomainEvent(string name, string version, string? partition)
Parameters
Type | Name | Description |
---|---|---|
string | name | The name of the domain event. |
string | version | The version of the domain event. |
string | partition | The partition associated with the event. |
Properties
| Edit this page View SourceApproximateArrivalTimestamp
Gets or sets the approximate arrival timestamp of the domain event.
Declaration
public DateTime ApproximateArrivalTimestamp { get; set; }
Property Value
Type | Description |
---|---|
DateTime |
CreatedAt
Gets or sets the date and time when the domain event was created.
Declaration
public DateTimeOffset CreatedAt { get; set; }
Property Value
Type | Description |
---|---|
DateTimeOffset |
EventId
Gets or sets the event ID associated with the domain event.
Declaration
public string? EventId { get; set; }
Property Value
Type | Description |
---|---|
string |
Name
Gets or sets the name of the domain event.
Declaration
public string Name { get; set; }
Property Value
Type | Description |
---|---|
string |
Partition
Gets or sets the partition associated with the domain event.
Declaration
public string? Partition { get; set; }
Property Value
Type | Description |
---|---|
string |
PublishedAt
Gets or sets the date and time when the domain event was published.
Declaration
public DateTimeOffset? PublishedAt { get; set; }
Property Value
Type | Description |
---|---|
DateTimeOffset? |
TraceId
Gets or sets the trace ID associated with the domain event.
Declaration
public string? TraceId { get; set; }
Property Value
Type | Description |
---|---|
string |
Version
Gets or sets the version of the domain event.
Declaration
public string Version { get; set; }
Property Value
Type | Description |
---|---|
string |
Methods
| Edit this page View SourceEmpty(string?)
Creates an empty domain event with the specified partition.
Declaration
public static DomainEvent Empty(string? partition)
Parameters
Type | Name | Description |
---|---|---|
string | partition | The partition associated with the event. |
Returns
Type | Description |
---|---|
DomainEvent | An instance of DomainEvent representing an empty domain event. |