static public double AfectInvestmentBy(this AccountTransaction transaction) { Type type = transaction.GetType(); if (type == typeof(CertificateOfDeposit)) { return(transaction.value()); } else { return(0); } }
static public double AfectNetBy(this AccountTransaction transaction) { Type type = transaction.GetType(); if (type == typeof(DepositTransferLeg) || type == typeof(WithdrawTransferLeg)) { return(transaction.AfectAccountBalanceIn()); } else { return(0); } }