Class ReadModelWatcherFactory
- Namespace
- Cratis.Chronicle.ReadModels
- Assembly
- Cratis.Chronicle.dll
Represents an implementation of IReadModelWatcherFactory.
public class ReadModelWatcherFactory : IReadModelWatcherFactory
- Inheritance
-
ReadModelWatcherFactory
- Implements
- Inherited Members
Constructors
ReadModelWatcherFactory(IEventStore, JsonSerializerOptions)
Represents an implementation of IReadModelWatcherFactory.
public ReadModelWatcherFactory(IEventStore eventStore, JsonSerializerOptions jsonSerializerOptions)
Parameters
eventStoreIEventStoreIEventStore the factory is for.
jsonSerializerOptionsJsonSerializerOptionsOptions for JSON serialization.
Methods
Create<TReadModel>(Action)
Create a watcher for a specific model.
public IReadModelWatcher<TReadModel> Create<TReadModel>(Action stopped)
Parameters
stoppedActionCallback for when the watcher is stopped.
Returns
- IReadModelWatcher<TReadModel>
An instance of IReadModelWatcher<TReadModel>.
Type Parameters
TReadModelType of read model the watcher is for.