Example #1
0
        public static void ExecuteTheOption(string option)
        {
            if (!String.IsNullOrWhiteSpace(option))
            {
                int value = Int32.Parse(option);

                switch (value)
                {
                case 1:
                    var pocSingDefault = new PocSingleton();
                    pocSingDefault.StartDefaultSingletonTest();

                    DrawMainScreen();
                    break;

                case 2:
                    var pocSingGenerics = new PocSingleton();
                    pocSingGenerics.StartGenericsSingletonTest();

                    DrawMainScreen();
                    break;

                case 3:
                    var pocAdapter = new PocAdapter();
                    pocAdapter.StartAdapterTest();

                    DrawMainScreen();
                    break;

                case 4:
                    DrawMainScreen();
                    break;

                case 5:
                    var pocFacade = new PocFacade();
                    pocFacade.StartFacadeTest();

                    DrawMainScreen();
                    break;

                default:
                    DrawMainScreen();
                    break;
                }
            }
            else
            {
                DrawMainScreen();
            }
        }
Example #2
0
        public static void ExecuteTheOption(string option)
        {
            if (!String.IsNullOrWhiteSpace(option))
            {
                int value = Int32.Parse(option);

                switch (value)
                {
                case 1:
                    var pocSingDefault = new PocSingleton();
                    pocSingDefault.StartDefaultSingletonTest();

                    DrawMainScreen();
                    break;

                case 2:
                    var pocSingGenerics = new PocSingleton();
                    pocSingGenerics.StartGenericsSingletonTest();

                    DrawMainScreen();
                    break;

                case 3:
                    var pocFactory = new PocFactory();
                    pocFactory.StartFactoryTest();

                    DrawMainScreen();
                    break;

                case 4:
                    var pocAbstractFactory = new PocAbstractFactory();
                    pocAbstractFactory.StartAbstractFactoryTest();
                    DrawMainScreen();
                    break;

                case 5:
                    var pocAdapter = new PocAdapter();
                    pocAdapter.StartAdapterTest();

                    DrawMainScreen();
                    break;

                case 6:
                    var pocDecorator = new PocDecorator();
                    pocDecorator.StartDecoratorTest();
                    DrawMainScreen();
                    break;

                case 7:
                    var pocFacade = new PocFacade();
                    pocFacade.StartFacadeTest();

                    DrawMainScreen();
                    break;

                case 8:
                    var pocCommand = new PocCommand();
                    pocCommand.StartCommandTest();

                    DrawMainScreen();
                    break;


                case 9:
                    var pocTemplateMethod = new PocTemplateMethod();
                    pocTemplateMethod.StartTemplateMethodTest();
                    DrawMainScreen();
                    break;


                case 0:
                    Environment.Exit(0);
                    break;

                default:
                    DrawMainScreen();
                    break;
                }
            }
            else
            {
                DrawMainScreen();
            }
        }