Ejemplo n.º 1
0
        public ulong AddAccountToClient(ulong clientId, AccountCreator accountCreator)
        {
            var account = accountCreator.CreateAccount(Id, clientId);

            if (Accounts.ContainsValue(account))
            {
                throw new AccountAlreadyRegisteredException();
            }
            Accounts.Add(_nextAccountId, account);
            Clients[clientId].AddAccount(_nextAccountId, account);

            return(_nextAccountId++);
        }
Ejemplo n.º 2
0
 public ulong AddAccountToClient(ulong bankId, ulong clientId, AccountCreator accountCreator)
 {
     return(_registeredBanks[bankId].AddAccountToClient(clientId, accountCreator));
 }