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
projectionIProjectionThe projection to inspect.
Returns
GetRelevantEventTypeNames(IProjection)
Returns the assembly-qualified names of the projection's relevant event types — used for wire-level matching.
string[] GetRelevantEventTypeNames(IProjection projection)
Parameters
projectionIProjectionThe projection to inspect.
Returns
- string[]
GetRelevantEventTypes(IProjection)
Returns the event types the projection declares HandleAsync methods for.
Type[] GetRelevantEventTypes(IProjection projection)
Parameters
projectionIProjectionThe 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
projectionIProjectionThe projection instance to drive.
eventsIReadOnlyList<IEvent>Events to dispatch (already filtered to relevant types by the manager).
cancellationTokenCancellationTokenCancellation token propagated to each handler invocation.