public UserAR(Snapshot snapshot, TransitionStream stream)
 {
     _state = snapshot != null ? (UserState) snapshot.Payload : new UserState();
     foreach (var transition in stream.Read())
     {
         foreach (var @event in transition.Events)
         {
             _state.Mutate((IEvent) @event.Data);
         }
     }
 }
 public void Save(Snapshot snapshot)
 {
     _snapshots[snapshot.StreamId] = snapshot;
 }