Class ReadModelWatcher<TReadModel>
- Namespace
- Cratis.Chronicle.ReadModels
- Assembly
- Cratis.Chronicle.dll
Represents an implementation of IReadModelWatcher<TReadModel>.
public class ReadModelWatcher<TReadModel> : IReadModelWatcher<TReadModel>, IReadModelWatcher, IDisposable
Type Parameters
TReadModelType of read model the watcher is for.
- Inheritance
-
ReadModelWatcher<TReadModel>
- Implements
-
IReadModelWatcher<TReadModel>
- Inherited Members
Constructors
ReadModelWatcher(IEventStore, Action, JsonSerializerOptions)
Initializes a new instance of the ReadModelWatcher<TReadModel> class.
public ReadModelWatcher(IEventStore eventStore, Action stopped, JsonSerializerOptions jsonSerializerOptions)
Parameters
eventStoreIEventStoreIEventStore the watcher is for.
stoppedActionCallback for when the watcher is stopped.
jsonSerializerOptionsJsonSerializerOptionsOptions for JSON serialization.
Properties
Observable
Gets the observable for the read model.
public IObservable<ReadModelChangeset<TReadModel>> Observable { get; }
Property Value
- IObservable<ReadModelChangeset<TReadModel>>
Methods
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
Start()
Start the watcher.
public void Start()
Stop()
Stop the watcher. Will be removed from the manager.
public void Stop()