Interface ICanResolveReadModelKey

Namespace
Cratis.Chronicle.Reactors
Assembly
Cratis.Chronicle.dll

Defines a system that resolves the ReadModelKey to use when a reactor handler method takes a read model as a dependency.

public interface ICanResolveReadModelKey
Extension Methods

Remarks

When a reactor implements this interface, the resolved key is used to materialize every read model parameter on its handler methods. When it is not implemented, the EventSourceId of the triggering event is used as the key.

Methods

Resolve(object, EventContext)

Resolve the ReadModelKey to use for materializing read model dependencies.

ReadModelKey Resolve(object @event, EventContext context)

Parameters

event object

The deserialized event that triggered the reactor.

context EventContext

The EventContext for the triggering event.

Returns

ReadModelKey

The ReadModelKey to materialize read model dependencies with.