Beispiel #1
0
        private static void Main(string[] args)
        {
            IExpenseHandler rajiv         = new ExpenseHandler(new Employee("Rajiv", Decimal.Zero));
            IExpenseHandler arunChaudhary = new ExpenseHandler(new Employee("Arun", new Decimal(1000)));
            IExpenseHandler sanjeevDhawan = new ExpenseHandler(new Employee("Sanjeev", new Decimal(5000)));
            IExpenseHandler aviragJain    = new ExpenseHandler(new Employee("Avirag", new Decimal(20000)));

            rajiv.Next(arunChaudhary);
            arunChaudhary.Next(sanjeevDhawan);
            sanjeevDhawan.Next(aviragJain);

            Decimal          expenseReportAmount = 5845000;
            ApprovalResponse response            = rajiv.Approve(expenseReportAmount);

            Console.WriteLine("The request was {0}", response);

            Console.Read();
        }