Interface IReadModelReactor

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

Marker interface for a read model reactor — a type that reacts to read model instances being added, modified or removed.

public interface IReadModelReactor
Extension Methods

Remarks

Method dispatch is by convention. A method named Added, Modified or Removed is invoked for the corresponding change. The first parameter is the read model — either a single instance or an IEnumerable<T> of instances — and determines which read model is watched. Further parameters are resolved as dependencies (the EventContext of the causing event or services from the service provider). Methods may be synchronous or asynchronous and may return events to be appended as side effects, exactly like reactors.