static void Main(string[] args)
        {
            // Creational
            AbstractFactoryExample.RunExample();
            FactoryExample.RunExample();
            SingletonExample.RunExample();

            // Structural
            CompositeExample.RunExample();
            FacadeExample.RunExample();
            ProxyExample.RunExample();

            // Behavioral
            AdapterExample.RunExample();
            ChainOfResponseExample.RunExample();
            IteratorExample.RunExample();
            MediatorExample.RunExample();
            ObserverExample.RunExample();
            StrategyExample.RunExample();



            var delegateAndEvents = new DelegateAndEventExample();

            delegateAndEvents.RunDelegateExample();
            delegateAndEvents.RunEventExample();



            Console.ReadKey(true);
        }
 public static void Main(string[] args)
 {
     AbstractFactoryExample.Introduce();
     BuilderExample.Introduce();
     ChainOfResponsibilityExample.Introduce();
     StateExample.Introduce();
     VisitorExample.Introduce();
 }
Beispiel #3
0
        private static void Main(string[] args)
        {
            AbstractFactoryExample.Run();

            AdapterExample.Run();

            ChainOfResponsibilityExample.Run();

            FlyWeightExample.Run();

            SingletonExample.Run();

            MementoExample.Run();

            Console.ReadLine();
        }
Beispiel #4
0
        static void Main(string[] args)
        {
            Assert.AreEqual(args, null);

            #region Creational Patterns
            //Abstract Factory;
            AbstractFactoryExample.AbstractFactory();

            #endregion

            //Adapter
            AdapterExample.Adapter();

            #region beavioural Patterns
            // Visitor
            Visitor visitor = new Visitor();
            visitor.Main();

            //Decorator
            DecoratorExample.Decorator();

            //Command
            CommandExample.Command();

            //Observer
            ObserverExample.Observer();

            #endregion

            //BusinessDelegate
            BusinessDelegateExample.BusinessDelegate();

            //DataTransferObject
            DataTransferObjectExample transferObjectExample = new DataTransferObjectExample();
            transferObjectExample.StartDemo();

            //UnitOfWork
            UnitOfWorkExample.UnitOfWork();
        }
 static void Main(string[] args)
 {
     AbstractFactoryExample.RunExample();
 }
 public void AbstractFactory()
 {
     AbstractFactoryExample.AbstractFactory();
 }
Beispiel #7
0
 private void AbstractFactory_button_Click(object sender, EventArgs e)
 {
     //進行抽象工廠模式的模擬建立
     AbstractFactoryExample Creational = new AbstractFactoryExample();
 }