Table of Contents

Interface IGlobalStreamProjection<TState>

Namespace
Excalibur.EventSourcing.Projections
Assembly
Excalibur.EventSourcing.dll

Defines a projection that processes events from the global event stream across all aggregates and types.

public interface IGlobalStreamProjection<TState> where TState : class

Type Parameters

TState

The projection state type.

Remarks

Global stream projections differ from per-aggregate projections in that they receive events from all streams. This enables cross-aggregate views such as dashboards, reporting, and analytics.

Implement this interface and register it with a GlobalStreamProjectionHost<TState> to process events continuously.

Methods

ApplyAsync(IDomainEvent, TState, CancellationToken)

Applies a domain event to the projection state.

Task ApplyAsync(IDomainEvent domainEvent, TState state, CancellationToken cancellationToken)

Parameters

domainEvent IDomainEvent

The domain event to apply.

state TState

The current projection state.

cancellationToken CancellationToken

Cancellation token.

Returns

Task

A task representing the asynchronous operation.