Aggregate<'TState, 'TCommand, 'TEvent>Type

PackageFCQRS
C#-friendly abstract base for an event-sourced aggregate. A concrete aggregate supplies only InitialState, EntityName, HandleCommand (the decision) and ApplyEvent (the fold); the base provides the wiring (Init). Designed to be subclassed from C#.

Specification

Kind
Type
Members
10
Examples
0
``.ctor``Signature
Aggregate()
ApplyEventSignature
this.ApplyEvent
HandleCommandSignature
this.HandleCommand
InitSignature
this.Init
InitSignature
this.Init

Summary

NameSignatureSynopsis
``.ctor``Aggregate()No description available.
ApplyEventthis.ApplyEventNo description available.
HandleCommandthis.HandleCommandNo description available.
Initthis.InitRegister the aggregate and hand back its Factory + Handler.
Initthis.InitRegister the aggregate with explicit (already-resolved) snapshot and idle-passivation policies.
Initthis.InitRegister the aggregate with an explicit (already-resolved) snapshot policy.
SnapshotPolicythis.SnapshotPolicyPer-aggregate snapshot cadence.
InitialStatethis.InitialStateNo description available.
EntityNamethis.EntityNameNo description available.
PassivationPolicythis.PassivationPolicyPer-aggregate idle passivation.

``.ctor``

Aggregate()
Member

Returns

Aggregate<'TState, 'TCommand, 'TEvent>

ApplyEvent

this.ApplyEvent
Member

Parameters

NameTypeDescription
arg0Event<'TEvent>
arg1'TState

Returns

'TState

HandleCommand

this.HandleCommand
Member

Parameters

NameTypeDescription
arg0Command<'TCommand>
arg1'TState

Returns

EventAction<'TEvent>

Init

this.Init
Member
Register the aggregate and hand back its Factory + Handler.

Parameters

NameTypeDescription
actorApiIActor

Returns

AggregateRefs<'TCommand, 'TEvent>

Init

this.Init
Member
Register the aggregate with explicit (already-resolved) snapshot and idle-passivation policies.

Parameters

NameTypeDescription
actorApiIActor
snapshotPolicySnapshotPolicy
passivationPolicyPassivationPolicy

Returns

AggregateRefs<'TCommand, 'TEvent>

Init

this.Init
Member
Register the aggregate with an explicit (already-resolved) snapshot policy.

Parameters

NameTypeDescription
actorApiIActor
snapshotPolicySnapshotPolicy

Returns

AggregateRefs<'TCommand, 'TEvent>

SnapshotPolicy

this.SnapshotPolicy
Member
Per-aggregate snapshot cadence. Override to use Every(n) or NoSnapshots; the default falls back to config:akka:persistence:snapshot-version-count (or 30).

Returns

SnapshotPolicy

InitialState

this.InitialState
Member

Returns

'TState

EntityName

this.EntityName
Member

Returns

string

PassivationPolicy

this.PassivationPolicy
Member
Per-aggregate idle passivation. Override with PassivationPolicy.NewAfter(...) or PassivationPolicy.Never; the default defers to akka.cluster.sharding[.EntityName].passivate-idle-entity-after (120s).

Returns

PassivationPolicy