Class EventSourcingAggregate<C, S, E, V, CM, EM>

Event sourcing aggregate is using/delegating a EventSourcingAggregate.decider of type IDecider<C, S, E> to handle commands and produce events. In order to handle the command, aggregate needs to fetch the current state (represented as a list of events) via IEventRepository.fetchEvents function, and then delegate the command to the EventSourcingAggregate.decider which can produce new event(s) as a result.

Produced events are then stored via IEventRepository.save function.

Type Param: E

Version

Author

Иван Дугалић / Ivan Dugalic /

Idugalic

Type Parameters

  • C

    Commands of type C that this aggregate can handle

  • S

    Aggregate state of type S

  • E

    Events of type E that this aggregate can publish

  • V
  • CM

    Command Metadata

  • EM

    Event Metadata

Hierarchy (view full)

Implements

Constructors

Properties

decider: IDecider<C, S, E>
eventRepository: IEventRepository<C, E, V, CM, EM>
initialState: S

Methods

Generated using TypeDoc