示例#1
0
 private void NewUserCreatedEventHandler(NewUserCreated e)
 {
     OverrideId(e.UserId);
     _username = e.Username;
     _hashedPassword = e.HashedPassword;
     _emailAddress = new EmailAddress(e.Email);
 }
示例#2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="User"/> class.
 /// </summary>
 /// <param name="username">The username.</param>
 /// <param name="hashedPassword">The hashed password.</param>
 /// <param name="emailAddress">The email address.</param>
 internal User(String username, String hashedPassword, String emailAddress)
 {
     var e = new NewUserCreated(Guid.NewGuid(), username, hashedPassword, emailAddress);
     ApplyEvent(e);
 }