コード例 #1
0
 public BehavioralPattern()
 {
     _chainOfResponsibilityDemo = new ChainOfResponsibilityDemo();
     _iteratorDemo = new IteratorDemo();
     _commandDemo  = new CommandDemo();
     _mediatorDemo = new MediatorDemo();
     _mementoDemo  = new MementoDemo();
     _observerDemo = new ObserverDemo();
     _stateDemo    = new StateDemo();
     _strategyDemo = new StrategyDemo();
     _visitorDemo  = new VisitorDemo();
 }
コード例 #2
0
        static void Main(string[] args)
        {
            //IExecutable app = new SingletonDemo();
            //IExecutable app = new BuilderDemo();
            //IExecutable app = new SimpleFactoryDemo();
            //IExecutable app = new FactoryMethodDemo();
            //IExecutable app = new StrategyDemo();
            IExecutable app = new ObserverDemo();

            app.Run();

            Console.WriteLine();
            Console.WriteLine("Press any key to exit...");
            Console.ReadKey();
        }