Пример #1
0
 public void AddUser(UserId userId, string userName)
 {
     ApplyChange(new NewUserAdded(Id, userId, userName));
 }
Пример #2
0
 public void ChangeUserName(UserId userId, string newUserName)
 {
     ApplyChange(new UserNameChanged(userId, newUserName));
 }
Пример #3
0
 private void When(NewUserAdded @event)
 {
     Id = new UserId(@event.UserId);
     UserName = @event.UserName;
 }