Interface IReducerObservers
- Namespace
- Cratis.Chronicle.Reducers
- Assembly
- Cratis.Chronicle.dll
Defines a system for managing observers of reducer changes.
public interface IReducerObservers
- Extension Methods
Methods
GetWatcher<TReadModel>()
Get a watcher for a specific read model type.
IReducerWatcher<TReadModel> GetWatcher<TReadModel>()
Returns
- IReducerWatcher<TReadModel>
An instance of IReducerWatcher<TReadModel>.
Type Parameters
TReadModelType of read model the watcher is for.
NotifyChange<TReadModel>(EventStoreNamespaceName, ReadModelKey, TReadModel?, bool)
Notify observers that a reducer has produced a change.
void NotifyChange<TReadModel>(EventStoreNamespaceName @namespace, ReadModelKey modelKey, TReadModel? readModel, bool removed)
Parameters
namespaceEventStoreNamespaceNameThe namespace for the event store.
modelKeyReadModelKeyThe ReadModelKey for the model.
readModelTReadModelThe instance of the read model.
removedboolWhether the read model was removed.
Type Parameters
TReadModelType of read model.