Table of Contents

Interface IReducerObservers

Namespace
Cratis.Chronicle.Reducers
Assembly
Cratis.Chronicle.dll

Defines a system for managing observers of reducer changes.

public interface IReducerObservers

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

TReadModel

Type 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

namespace EventStoreNamespaceName

The namespace for the event store.

modelKey ReadModelKey

The ReadModelKey for the model.

readModel TReadModel

The instance of the read model.

removed bool

Whether the read model was removed.

Type Parameters

TReadModel

Type of read model.