Table of Contents

Interface IEphemeralProjectionEngine

Namespace
Excalibur.EventSourcing
Assembly
Excalibur.EventSourcing.Abstractions.dll

Builds projections on-demand by replaying events without persisting the result. Equivalent to Marten's "Live" projection mode.

public interface IEphemeralProjectionEngine

Remarks

Ephemeral projections replay all events for a given aggregate and return a fully-hydrated projection instance. The result is NOT stored in any projection store.

Ephemeral projections use the same When<T> handlers registered via IProjectionBuilder<T>, ensuring consistency with stored projections.

Optional caching via IDistributedCache is supported when the projection is configured with .WithCacheTtl().

Methods

BuildAsync<TProjection>(string, string, CancellationToken)

Builds a projection by replaying all events for the specified aggregate.

Task<TProjection> BuildAsync<TProjection>(string aggregateId, string aggregateType, CancellationToken cancellationToken) where TProjection : class, new()

Parameters

aggregateId string

The aggregate identifier.

aggregateType string

The aggregate type name.

cancellationToken CancellationToken

Cancellation token.

Returns

Task<TProjection>

A fully-hydrated projection built from the aggregate's event stream.

Type Parameters

TProjection

The projection state type.