Beispiel #1
0
        public Money GetCurrentBalance()
        {
            Money totalCredits = CreditsCollection
                                 .GetTotal();

            Money totalDebits = DebitsCollection
                                .GetTotal();

            Money totalAmount = totalCredits
                                .Subtract(totalDebits);

            return(totalAmount);
        }
Beispiel #2
0
 public void Deposit(Credit credit)
 {
     CreditsCollection.Add(credit);
 }
Beispiel #3
0
 protected Account()
 {
     Credits = new CreditsCollection();
     Debits  = new DebitsCollection();
 }