Beispiel #1
0
        static void Main(string[] args)
        {
            // Behavioural examples
            var strategy = new StrategyExample();

            strategy.RunExample();

            var chain = new ChainOfResponsibilityExample();

            chain.RunExample();

            var memento = new MementoExample();

            memento.RunExample();

            // Creational examples
            var singleton = new SingletonExample();

            singleton.RunExample();

            var builder = new BuilderExample();

            builder.RunExample();

            // Structural examples
            var adapter = new AdapterExample();

            adapter.RunExample();
        }
Beispiel #2
0
        private static void Main(string[] args)
        {
            AbstractFactoryExample.Run();

            AdapterExample.Run();

            ChainOfResponsibilityExample.Run();

            FlyWeightExample.Run();

            SingletonExample.Run();

            MementoExample.Run();

            Console.ReadLine();
        }
Beispiel #3
0
 public static void Main(string[] args)
 {
     MementoExample.Execute();
     MementoExample2.Execute();
     System.Console.ReadKey();
 }