コード例 #1
0
 public Money CalculateBalance()
 {
     return(_transactionLog.Accept(new BalanceCalculatingVisitor(), new Money(0m)));
 }
コード例 #2
0
        public void PrintLastTransaction(ILedger ledger)
        {
            var lastTransaction = ledger.Accept(new LastTransactionVisitor(), null);

            Console.Write("Last transaction: {0}", lastTransaction);
        }