create
abstract fun <C : Any, S : Any> create(metadata: AggregateMetadata<C, S>, stateAggregate: StateAggregate<S>): CommandAggregate<C, S>
Creates a new command aggregate instance.
Return
A new command aggregate instance.
Parameters
C
The type of the command aggregate root.
S
The type of the state aggregate.
metadata
The aggregate metadata containing configuration and function registries.
stateAggregate
The state aggregate providing the current state.