Class StatefulAggregateRootMutator<TState>
- Namespace
- Cratis.Chronicle.Aggregates
- Assembly
- Cratis.Chronicle.dll
Represents an implementation of IAggregateRootMutator for stateful IAggregateRoot.
public class StatefulAggregateRootMutator<TState> : IAggregateRootMutator
Type Parameters
TState
Type of state.
- Inheritance
-
StatefulAggregateRootMutator<TState>
- Implements
- Inherited Members
Constructors
StatefulAggregateRootMutator(IAggregateRootState<TState>, IAggregateRootStateProvider<TState>)
Represents an implementation of IAggregateRootMutator for stateful IAggregateRoot.
public StatefulAggregateRootMutator(IAggregateRootState<TState> state, IAggregateRootStateProvider<TState> stateProvider)
Parameters
state
IAggregateRootState<TState>The IAggregateRootState<TState> for the aggregate root.
stateProvider
IAggregateRootStateProvider<TState>The IAggregateRootStateProvider<TState> for the aggregate root.
Methods
Dehydrate()
Dehydrate the mutation.
public Task Dehydrate()
Returns
- Task
Awaitable task.
Mutate(object)
Mutate the aggregate root with an event.
public Task Mutate(object @event)
Parameters
event
objectEvent to mutate with.
Returns
- Task
Awaitable task.
Rehydrate()
Rehydrate the mutation.
public Task Rehydrate()
Returns
- Task
Awaitable task.