Table of Contents

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

TReadModel

Type 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

eventStore IEventStore

IEventStore the watcher is for.

stopped Action

Callback for when the watcher is stopped.

jsonSerializerOptions JsonSerializerOptions

Options 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()