Table of Contents

Class TracedDomainEventExtensions

Namespace
Savvyio.Domain.EventSourcing
Assembly
Savvyio.Domain.EventSourcing.dll

Extension methods for the ITracedDomainEvent interface.

public static class TracedDomainEventExtensions
Inheritance
object
TracedDomainEventExtensions

Methods

GetAggregateVersion<T>(T)

Gets the aggregate version from the request.

public static long GetAggregateVersion<T>(this T request) where T : ITracedDomainEvent

Parameters

request T

The ITracedDomainEvent to extend.

Returns

long

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 T

The 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, long)

Assigns a new version to the request.

public static T SetAggregateVersion<T>(this T request, long version) where T : ITracedDomainEvent

Parameters

request T

The ITracedDomainEvent to extend.

version long

The 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.