Interface IReadModelReactorInvoker

Namespace
Cratis.Chronicle.ReadModels
Assembly
Cratis.Chronicle.dll

Defines a system that invokes a IReadModelReactor handler method for a read model change.

public interface IReadModelReactorInvoker
Extension Methods

Methods

Invoke(IEventStore, object, ReadModelReactorMethod, object?, EventContext, IServiceProvider)

Invoke a read model reactor handler method for a change.

Task Invoke(IEventStore eventStore, object reactor, ReadModelReactorMethod method, object? readModel, EventContext changeContext, IServiceProvider serviceProvider)

Parameters

eventStore IEventStore

The IEventStore used to append any side-effect events.

reactor object

The reactor instance.

method ReadModelReactorMethod

The ReadModelReactorMethod to invoke.

readModel object

The read model instance that changed, if any.

changeContext EventContext

The EventContext of the event that caused the change.

serviceProvider IServiceProvider

The IServiceProvider used to resolve additional dependencies.

Returns

Task

A Task representing the asynchronous operation.