void When(AddedUserAccount @event) { Id = new UserAccountId(@event.UserAccountId); _roles = new HashSet <RoleId>(); _roleGroups = new HashSet <RoleGroupId>(); _disabled = false; }
// Behavior public UserAccount(UserAccountId userAccountId, UserAccountName name) : this() { Apply( new AddedUserAccount(userAccountId, name)); }