예제 #1
0
        public void RemoveAccount(Account account)
        {
            if (!this.accountRegistry.ContainsKey(account.IBAN))
            {
                throw new ApplicationException("Account does not exist!");
            }

            this.accountRegistry.Remove(account.IBAN);
        }
예제 #2
0
        public void AddAccount(Account account)
        {
            if (this.accountRegistry.ContainsKey(account.IBAN))
            {
                throw new ApplicationException("Trying to add an account that already extists!");
            }

            this.accountRegistry[account.IBAN] = account;
        }