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
| Name | Signature | Synopsis |
|---|---|---|
| Init | QueryApi.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. |
| Init | QueryApi.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. |
| Init | QueryApi.Init(actorApi, eventHandler, ?name) | Starts a projection whose handler returns the notifications to publish. |
| Init | QueryApi.Init(actorApi, eventHandler, ?name) | Starts a projection whose handler returns the notifications to publish (F# list). |
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
| Name | Type | Description |
|---|---|---|
| actorApi | IActor | |
| eventHandler | Func<obj, Notify> | |
| name | string |
Returns
IProjection
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
| Name | Type | Description |
|---|---|---|
| actorApi | IActor | |
| eventHandler | Action<obj> | |
| name | string |
Returns
IProjection
Starts a projection whose handler returns the notifications to publish. An overload of
Init, distinguished by the handler's return type.
Parameters
| Name | Type | Description |
|---|---|---|
| actorApi | IActor | |
| eventHandler | Func<obj, IList<IMessageWithCID>> | |
| name | string |
Returns
IProjection