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); }
static void Main(string[] args) { IExampleRunable example = null; // Creational example = new SimpleFactoryMethodsExample(); example = new FactoryMethodExample(); example = new BuilderExample(); example = new PrototypeMemberwiseExample(); // Structural example = new FlyweightExample(); example = new CompositeExample(); example = new BridgeExample(); // Behaviour // example = new VisitorExample(); example.Run(); Console.ReadKey(); }
public void Composite() { CompositeExample.Composite(); }
public void Set_composite() { _composite = new CompositeExample(); }
public void test01() { CompositeExample compositeExample = new CompositeExample(); compositeExample.method01(); }