Class DomainEventExtensions
Extension methods for the IDomainEvent interface.
public static class DomainEventExtensions
- Inheritance
-
objectDomainEventExtensions
Methods
GetEventId<T>(T)
Gets the string representation of the event identifier from the request
.
public static string GetEventId<T>(this T request) where T : IDomainEvent
Parameters
request
TThe ITracedDomainEvent to extend.
Returns
- string
The string representation of the event identifier from the
request
.
Type Parameters
T
The model that implements the ITracedDomainEvent interface.
GetTimestamp<T>(T)
Gets the DateTime value of the timestamp from the request
.
public static DateTime GetTimestamp<T>(this T request) where T : IDomainEvent
Parameters
request
TThe ITracedDomainEvent to extend.
Returns
Type Parameters
T
The model that implements the ITracedDomainEvent interface.