Esempio n. 1
0
 public GroupAccount(Account account, Group group, GroupAccountType type)
 {
     Account   = account ?? throw new ArgumentNullException(nameof(account));
     Group     = group ?? throw new ArgumentNullException(nameof(group));
     Type      = type ?? throw new ArgumentNullException(nameof(type));
     AccountId = account.Id;
     GroupId   = group.Id;
     TypeId    = type.Id;
 }
Esempio n. 2
0
        private void AddAccount(Account account, GroupAccountType type)
        {
            _ = account ?? throw new ArgumentNullException(nameof(account));

            if (GroupAccounts.All(x => x.Account != account))
            {
                var groupAccount = new GroupAccount(account, this, type);
                GroupAccounts.Add(groupAccount);
                account.GroupAccounts.Add(groupAccount);
            }
        }