コード例 #1
0
        public static void AbstractFactoryExample()
        {
            //Меню на понедельник
            var mondayFactory = new MondayFactory();

            PrintMenu(mondayFactory);

            //Меню на вторник
            var tuesdayFactory = new TuesdayFactory();

            PrintMenu(tuesdayFactory);

            //Меню на вторник
            //PrintMenu(WeekDay.Tuesday);
        }
コード例 #2
0
        static void Main(string[] args)
        {
            Runner.Run();

            //Меню на понедельник
            var mondayFactory = new MondayFactory();

            PrintMenu(mondayFactory);

            //Меню на вторник
            var tuesdayFactory = new TuesdayFactory();

            PrintMenu(tuesdayFactory);

            //Меню на вторник
            //PrintMenu(DayOfWeek.Tuesday);

            Console.ReadKey();
        }