public UserAR(string userId, string name, string password)
 {
     _state = new UserState();
     Apply(new User_CreatedEvent
     {
         UserId = userId,
         Password = password,
         Name = name
     });
 }
 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);
         }
     }
 }