QueryApiType

PackageFCQRS
C#-friendly projection API. A projection follows each aggregate's and saga's own sequence numbers, so it never skips a stored event. Without a name, it keeps its progress in memory and reads the whole journal each time it starts. With a name, it stores its progress in the journal database under that name and resumes where it stopped; a handler can then see an event again after a crash. A handler that throws terminates the process.

Specification

Kind
Type
Members
4
Examples
0
InitSignature
QueryApi.Init(actorApi, eventHandler, ?name)
InitSignature
QueryApi.Init(actorApi, eventHandler, ?name)
InitSignature
QueryApi.Init(actorApi, eventHandler, ?name)
InitSignature
QueryApi.Init(actorApi, eventHandler, ?name)

Summary

NameSignatureSynopsis
InitQueryApi.Init(actorApi, eventHandler, ?name)Starts a projection with a filtered single-event handler: the handler updates the read model and returns Publish/Suppress to say whether this event wakes subscribers.
InitQueryApi.Init(actorApi, eventHandler, ?name)Starts a projection with a single-event handler: the handler just updates the read model (returns void); each aggregate event is then published to subscribers as-is.
InitQueryApi.Init(actorApi, eventHandler, ?name)Starts a projection whose handler returns the notifications to publish.
InitQueryApi.Init(actorApi, eventHandler, ?name)Starts a projection whose handler returns the notifications to publish (F# list).

Init

QueryApi.Init(actorApi, eventHandler, ?name)
Member
Starts a projection with a filtered single-event handler: the handler updates the read model and returns Publish/Suppress to say whether this event wakes subscribers.

Parameters

NameTypeDescription
actorApiIActor
eventHandlerFunc<obj, Notify>
namestring

Returns

IProjection

Init

QueryApi.Init(actorApi, eventHandler, ?name)
Member
Starts a projection with a single-event handler: the handler just updates the read model (returns void); each aggregate event is then published to subscribers as-is. Use a list-returning overload when notifications must be filtered or transformed.

Parameters

NameTypeDescription
actorApiIActor
eventHandlerAction<obj>
namestring

Returns

IProjection

Init

QueryApi.Init(actorApi, eventHandler, ?name)
Member
Starts a projection whose handler returns the notifications to publish. An overload of Init, distinguished by the handler's return type.

Parameters

NameTypeDescription
actorApiIActor
eventHandlerFunc<obj, IList<IMessageWithCID>>
namestring

Returns

IProjection

Init

QueryApi.Init(actorApi, eventHandler, ?name)
Member
Starts a projection whose handler returns the notifications to publish (F# list).

Parameters

NameTypeDescription
actorApiIActor
eventHandlerFunc<obj, IMessageWithCID list>
namestring

Returns

IProjection