Class DomainEvent
- Namespace
- Savvyio.Domain
- Assembly
- Savvyio.Domain.dll
Provides a default implementation of the IDomainEvent interface.
public abstract class DomainEvent : Request, IEquatable<Request>, IDomainEvent, IRequest, IMetadata, IEquatable<DomainEvent>
- Inheritance
-
ObjectDomainEvent
- Implements
-
IEquatable<Request>IEquatable<DomainEvent>
- 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 |