Class DomainEvent
Provides a default implementation of the IDomainEvent interface.
public abstract record DomainEvent : Request, IEquatable<Request>, IDomainEvent, IRequest, IMetadata, IEquatable<DomainEvent>
- Inheritance
-
objectDomainEvent
- Implements
- Derived
- Inherited Members
- Extension Methods
Constructors
DomainEvent(string, IMetadata)
Initializes a new instance of the DomainEvent class.
protected DomainEvent(string eventId = null, IMetadata metadata = null)
Parameters
eventId
stringThe optional identifier of the event. Default is an auto-generated UUID.
metadata
IMetadataThe optional metadata to merge with this instance.
Remarks
The following table shows the initial metadata values for an instance of DomainEvent.
Key | Initial Value |
---|---|
EventId | eventId ?? Guid.NewGuid().ToString("N") |
Timestamp | DateTime.UtcNow |