newInstance method
TAggregate
newInstance(
- TId id, [
- TState? state
Create new Aggregate instance of type TAggregate
Implementation
TAggregate newInstance(TId id, [TState? state]) {
return _onNew == null
? AggregateTypes.create<TEvent, TValue, TId, TState, TAggregate>(
id, state)
: _onNew!(id, state);
}