Table of Contents

ToTracedDomainEvent Method

Definition

ToTracedDomainEvent<TEntity, TKey>(EfCoreTracedAggregateEntity<TEntity, TKey>, Type, IMarshaller)

Converts the specified entity into an implementation of ITracedDomainEvent interface equivalent to tracedDomainEventType.

public static ITracedDomainEvent ToTracedDomainEvent<TEntity, TKey>(this EfCoreTracedAggregateEntity<TEntity, TKey> entity, Type tracedDomainEventType, IMarshaller marshaller) where TEntity : class, ITracedAggregateRoot<TKey>

Parameters

entity EfCoreTracedAggregateEntity<TEntity, TKey>

The entity to convert.

tracedDomainEventType Type

The originating type of ITracedDomainEvent.

marshaller IMarshaller

The IMarshaller that is used when converting the specified tracedDomainEventType into a deserialized version of ITracedDomainEvent.

Returns

ITracedDomainEvent

A new instance of an ITracedDomainEvent implementation.

Type Parameters

TEntity

The type of the entity that implements the ITracedAggregateRoot<TKey> interface.

TKey

The type of the key that uniquely identifies the entity.