コード例 #1
0
        public IFinanceStatement Get <T>(Func <IFinanceStatement, bool> predicate) where T : class, IFinanceStatement
        {
            if (IsExpense(typeof(T)))
            {
                return(Expenses.Get(predicate));
            }

            else if (IsIncome(typeof(T)))
            {
                return(Incomes.Get(predicate));
            }

            else if (IsInvestment(typeof(T)))
            {
                return(Investments.Get(predicate));
            }

            throw new FinanceStatementNotFoundException("not found!");
        }