public override void Process(IEvent @event) { var current = _mobStore.Get(@event.Subject); var mutated = _mobMutator.Mutate(current, @event); _mobStore.Persist(mutated); }
private T Play(IEnumerable <IEvent> events) { var aggregate = new T(); foreach (var e in events) { aggregate = _mutator.Mutate(aggregate, e); } return(aggregate); }