Ejemplo n.º 1
0
 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;
 }
Ejemplo n.º 2
0
 public void SetUserAccount(UserAccount userAccount)
 {
     if (userAccount == null)
         throw new ArgumentNullException("userAccount");
     _userAccount = userAccount;
 }
Ejemplo n.º 3
0
 private void SelectAccount(UserAccount userAccount)
 {
     OnUserAccountSelected(new EventArgs<UserAccount>(userAccount));
     _accountSelected = true;
     Dispose();
 }