コード例 #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++);
        }
コード例 #2
0
 public ulong AddAccountToClient(ulong bankId, ulong clientId, AccountCreator accountCreator)
 {
     return(_registeredBanks[bankId].AddAccountToClient(clientId, accountCreator));
 }