コード例 #1
0
        public Statement GetStatement(YearAndMonth yearAndMonth)
        {
            var transactions = _transactions
                               .Where(t => yearAndMonth.Matches(t.Date));

            return(new Statement(yearAndMonth, transactions));
        }
コード例 #2
0
ファイル: Statement.cs プロジェクト: GetAcademy/BankOO
 public Statement(YearAndMonth yearAndMonth, IEnumerable <Transaction> transactions)
 {
     _yearAndMonth = yearAndMonth;
     Transactions  = transactions.ToArray();
 }
コード例 #3
0
 public IEnumerable <Statement> GetStatements(YearAndMonth yearAndMonth)
 {
     return(_accounts.Select(a => a.GetStatement(yearAndMonth)));
 }
コード例 #4
0
        public Statement GetLatestStatement()
        {
            var latestCompletedMonth = YearAndMonth.GetLatestMonth();

            return(GetStatement(latestCompletedMonth));
        }
コード例 #5
0
        public IEnumerable <Statement> GetLatestStatements()
        {
            var latestCompletedMonth = YearAndMonth.GetLatestMonth();

            return(GetStatements(latestCompletedMonth));
        }