Skip to main content
Table of Contents

Interface IProjectionHandler

Namespace
Stratara.Projections.Abstractions
Assembly
Stratara.Projections.dll

Drives a single IProjection through a list of events, using the IProjectionMethodInvoker to look up cached handler delegates.

public interface IProjectionHandler
Extension Methods

Methods

GetProjectionName(IProjection)

Returns a stable display name for the projection (used in diagnostics + logging scopes).

string GetProjectionName(IProjection projection)

Parameters

projection IProjection

The projection to inspect.

Returns

string

GetRelevantEventTypeNames(IProjection)

Returns the assembly-qualified names of the projection's relevant event types — used for wire-level matching.

string[] GetRelevantEventTypeNames(IProjection projection)

Parameters

projection IProjection

The projection to inspect.

Returns

string[]

GetRelevantEventTypes(IProjection)

Returns the event types the projection declares HandleAsync methods for.

Type[] GetRelevantEventTypes(IProjection projection)

Parameters

projection IProjection

The projection to inspect.

Returns

Type[]

ProjectAsync(IProjection, IReadOnlyList<IEvent>, CancellationToken)

Projects a list of events onto the given projection, in order.

Task ProjectAsync(IProjection projection, IReadOnlyList<IEvent> events, CancellationToken cancellationToken = default)

Parameters

projection IProjection

The projection instance to drive.

events IReadOnlyList<IEvent>

Events to dispatch (already filtered to relevant types by the manager).

cancellationToken CancellationToken

Cancellation token propagated to each handler invocation.

Returns

Task