dotnet-cqrs/docs/api-reference/event-interfaces.md

652 B

Event Interfaces

Event streaming interfaces.

IEventStreamStore

public interface IEventStreamStore
{
    Task AppendAsync(string streamName, object @event, CancellationToken ct = default);
    IAsyncEnumerable<StreamEvent> ReadStreamAsync(string streamName, long fromOffset, CancellationToken ct = default);
}

IEventSubscriptionService

public interface IEventSubscriptionService
{
    Task<IAsyncDisposable> SubscribeAsync(string streamName, Func<StreamEvent, Task> handler, CancellationToken ct = default);
}

See Also