Example #1
0
    public void MainShow()
    {
        FactoryPatternTest factoryPatternTest = new FactoryPatternTest();
        EggFood            eggFood            = factoryPatternTest.ShowFactory("Egg") as EggFood;

        eggFood.ShowMe();
    }
        static void Main(string[] args)
        {
            StrategyPatternTest strategyPattern = new StrategyPatternTest();

            strategyPattern.MiniDuckSimulator();
            strategyPattern.RPGSimulator();
            Console.WriteLine();

            ObserverPatternTest observerPattern = new ObserverPatternTest();

            observerPattern.WeatherStation();
            Console.WriteLine();

            DecoratorPatternTest decoratorPattern = new DecoratorPatternTest();

            decoratorPattern.StarBuzzCoffee();
            Console.WriteLine();

            FactoryPatternTest factoryPattern = new FactoryPatternTest();

            factoryPattern.BuyCheesePizza();
            Console.WriteLine();

            Console.ReadLine();
        }