EventActions Type
C#-friendly factory methods for EventAction
Static members
| Static member | Description |
|
|
Full Usage:
EventActions.Dispatch(description)
Parameters:
obj
Returns: EventAction<'TEvent>
|
Create a RunAsync effect (a "mini saga" without persistence) from an INSPECTABLE description object. The runner registered via `InitAggregateWithEffects` executes it and self-dispatches the resulting command. EPHEMERAL (not journaled, so a crash mid-flight loses it) and TOTAL (the runner must map failure to a command). See EventAction.RunAsync.
|
|
|
|
|
Full Usage:
EventActions.PersistAll(events)
Parameters:
'TEvent[]
Returns: EventAction<'TEvent>
|
|
Full Usage:
EventActions.PersistAndSnapshot(event)
Parameters:
'TEvent
Returns: EventAction<'TEvent>
|
|
Full Usage:
EventActions.PersistConditionally(shouldPersist, event)
Parameters:
bool
event : 'TEvent
Returns: EventAction<'TEvent>
|
Persist the event when `shouldPersist` is true; otherwise Defer it - the event is still published and folded but is not written to the journal or sent through a projection. Its fold should preserve the current state. The idempotent "emit this verdict, but only write it once" shape, e.g. re-approving an already-approved aggregate: `PersistConditionally(state.Approval != Approved, new Approved(id))`.
|
FCQRS