Class TracedDomainEventExtensions
- Namespace
- Savvyio.Domain.EventSourcing
- Assembly
- Savvyio.Domain.EventSourcing.dll
Extension methods for the ITracedDomainEvent interface.
public static class TracedDomainEventExtensions
- Inheritance
-
ObjectTracedDomainEventExtensions
Methods
GetAggregateVersion<T>(T)
Gets the aggregate version from the request
.
public static long GetAggregateVersion<T>(this T request)
where T : ITracedDomainEvent
Parameters
request
TThe ITracedDomainEvent to extend.
Returns
- Int64
The version of the associated ITracedAggregateRoot<TKey>.
Type Parameters
T
The model that implements the ITracedDomainEvent interface.
GetMemberType<T>(T)
Gets the string representation of the type from the request
.
public static string GetMemberType<T>(this T request)
where T : ITracedDomainEvent
Parameters
request
TThe ITracedDomainEvent to extend.
Returns
- String
The string representation of the type from the
request
.
Type Parameters
T
The model that implements the ITracedDomainEvent interface.
SetAggregateVersion<T>(T, Int64)
Assigns a new version
to the request
.
public static T SetAggregateVersion<T>(this T request, long version)
where T : ITracedDomainEvent
Parameters
request
TThe ITracedDomainEvent to extend.
version
Int64The aggregate version of the model.
Returns
- T
A reference to
request
after the operation has completed.
Type Parameters
T
The model that implements the ITracedDomainEvent interface.