public AllocatedCashflow(Account account, DateTime date, int type, double amount) : base(date, type, amount) { Account = account; }
public static void Example6() { Account acc1 = new Account(1); Account acc2 = new Account(2); Object[] cashflows = { Bridge.WrapCLR(new AllocatedCashflow(acc1,("01/01/2007"),TypedCashflow.CREDIT, 300.00)), Bridge.WrapCLR(new AllocatedCashflow(acc1,("05/02/2007"),TypedCashflow.CREDIT, 100.00)), Bridge.WrapCLR(new AllocatedCashflow(acc2,("11/03/2007"),TypedCashflow.CREDIT, 500.00)), Bridge.WrapCLR(new AllocatedCashflow(acc1,("07/02/2007"),TypedCashflow.DEBIT, 800.00)), Bridge.WrapCLR(new AllocatedCashflow(acc2,("02/03/2007"),TypedCashflow.DEBIT, 400.00)), Bridge.WrapCLR(new AllocatedCashflow(acc1,("01/04/2007"),TypedCashflow.CREDIT, 200.00)), Bridge.WrapCLR(new AllocatedCashflow(acc1,("05/04/2007"),TypedCashflow.CREDIT, 300.00)), Bridge.WrapCLR(new AllocatedCashflow(acc2,("11/05/2007"),TypedCashflow.CREDIT, 700.00)), Bridge.WrapCLR(new AllocatedCashflow(acc1,("07/05/2007"),TypedCashflow.DEBIT, 900.00)), Bridge.WrapCLR(new AllocatedCashflow(acc2,("02/05/2007"),TypedCashflow.DEBIT, 100.00)) }; new RuleRunner().runRules( new string[] { "Example6.drl" },cashflows ); }