예제 #1
0
        public static void Show()
        {
            AuditContext    auditContext = new AuditContext(30, "ZZZ");
            AbstractAuditor pm           = new PM("PM");
            AbstractAuditor manager      = new Manager("Manager");
            AbstractAuditor vice         = new VicePresent("Vice");
            AbstractAuditor present      = new Present("Present");

            pm.NextApprover      = manager;
            manager.NextApprover = vice;
            vice.NextApprover    = present;
            var result = pm.ProcessRequest(auditContext);

            if (result)
            {
                System.Console.WriteLine("Thanx boss");
            }
            else
            {
                System.Console.WriteLine("I will go");
            }
        }