public UserAccount CreateNewUser(string userName)
 {
     if (userName == null)
         throw new ArgumentNullException("userName");
     if (UserExists(userName))
         return null;
     var userAccount = new UserAccount(userName);
     _userAccounts.Add(userAccount);
     return userAccount;
 }
Exemple #2
0
 public void SetUserAccount(UserAccount userAccount)
 {
     if (userAccount == null)
         throw new ArgumentNullException("userAccount");
     _userAccount = userAccount;
 }
 private void SelectAccount(UserAccount userAccount)
 {
     OnUserAccountSelected(new EventArgs<UserAccount>(userAccount));
     _accountSelected = true;
     Dispose();
 }