public static void Run()
        {
            IHandler handler = new TopBureaucrat("H.R. Giger");

            handler = new DirectorBureaucrat("G. Helger", handler);
            handler = new SeniorBureaucrat("E. Frieger", handler);
            handler = new MidLevelBureaucrat("C. Dreger", handler);
            handler = new JuniorBureaucrat("A. Berger", handler);

            Bureaucracy theBureaucracy = new Bureaucracy(handler);

            Request r01 = new Request(new Form(FormType.A012), "*****@*****.**");
            Request r02 = new Request(new Form(FormType.A041), "*****@*****.**");
            Request r03 = new Request(new Form(FormType.A767), "*****@*****.**");
            Request r04 = new Request(new Form(FormType.B113), "*****@*****.**");
            Request r05 = new Request(new Form(FormType.B096), "*****@*****.**");
            Request r06 = new Request(new Form(FormType.J072), "*****@*****.**");
            Request r07 = new Request(new Form(FormType.J880), "*****@*****.**");
            Request r08 = new Request(new Form(FormType.S022), "*****@*****.**");
            Request r09 = new Request(new Form(FormType.T505), "*****@*****.**");
            Request r10 = new Request(new Form(FormType.T678), "*****@*****.**");
            Request r11 = new Request(new Form(FormType.T902), "*****@*****.**");
            Request r12 = new Request(new Form(FormType.Z044), "*****@*****.**");
            Request r13 = new Request(new Form(FormType.Z096), "*****@*****.**");

            List <Request> requests = new List <Request> {
                r01, r02, r03, r04, r05, r06, r07, r08, r09, r10, r11, r12, r13
            };

            foreach (Request req in requests)
            {
                theBureaucracy.SubmitRequest(req);
            }
        }
Exemple #2
0
        public IHandler Configure()
        {
            IHandler handler = new TopBureaucrat("H.R. Giger");

            handler = new DirectorBureaucrat("G. Helger", handler);
            handler = new SeniorBureaucrat("E. Frieger", handler);
            handler = new MidLevelBureaucrat("C. Dreger", handler);
            handler = new JuniorBureaucrat("A. Berger", handler);

            return(handler);
        }