Header menu logo FCQRS

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

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#.

Constructors

Constructor Description

Aggregate()

Full Usage: Aggregate()

Returns: Aggregate<'TState, 'TCommand, 'TEvent>
Returns: Aggregate<'TState, 'TCommand, 'TEvent>

Instance members

Instance member Description

this.ApplyEvent

Full Usage: this.ApplyEvent

Parameters:
    arg0 : Event<'TEvent>
    arg1 : 'TState

Returns: 'TState
Modifiers: abstract
arg0 : Event<'TEvent>
arg1 : 'TState
Returns: 'TState

this.EntityName

Full Usage: this.EntityName

Returns: string
Modifiers: abstract
Returns: string

this.HandleCommand

Full Usage: this.HandleCommand

Parameters:
    arg0 : Command<'TCommand>
    arg1 : 'TState

Returns: EventAction<'TEvent>
Modifiers: abstract
arg0 : Command<'TCommand>
arg1 : 'TState
Returns: EventAction<'TEvent>

this.Init

Full Usage: this.Init

Parameters:
Returns: AggregateRefs<'TCommand, 'TEvent>

Register the aggregate and hand back its Factory + Handler.

actorApi : IActor
Returns: AggregateRefs<'TCommand, 'TEvent>

this.Init

Full Usage: this.Init

Parameters:
Returns: AggregateRefs<'TCommand, 'TEvent>

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

actorApi : IActor
snapshotPolicy : SnapshotPolicy
passivationPolicy : PassivationPolicy
Returns: AggregateRefs<'TCommand, 'TEvent>

this.Init

Full Usage: this.Init

Parameters:
Returns: AggregateRefs<'TCommand, 'TEvent>

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

actorApi : IActor
snapshotPolicy : SnapshotPolicy
Returns: AggregateRefs<'TCommand, 'TEvent>

this.InitialState

Full Usage: this.InitialState

Returns: 'TState
Modifiers: abstract
Returns: 'TState

this.PassivationPolicy

Full Usage: this.PassivationPolicy

Returns: PassivationPolicy
Modifiers: abstract

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

this.SnapshotPolicy

Full Usage: this.SnapshotPolicy

Returns: SnapshotPolicy
Modifiers: abstract

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

Type something to start searching.