public StructuralPattern() { _proxyDemo = new ProxyDemo(); _flyweightDemo = new FlyweightDemo(); _adapterDemo = new AdapterDemo(); _bridgeDemo = new BridgeDemo(); _decoratorDemo = new DecoratorDemo(); _facadeDemo = new FacadeDemo(); }
public static void Main(string[] args) { //AbstractFactoryDemo.Run(); //BuilderDemo.Run(); //FactoryMethodDemo.Run(); //PrototypeDemo.Run(); //SingletonDemo.Run(); //ChainOfResponsibilityDemo.Run(); //CommandDemo.Run(); //ObserverDemo.Run(); //StateDemo.Run(); //StrategyDemo.Run(); //TemplatedMethodDemo.Run(); //AdapterDemo.Run(); //DecoratorDemo.Run(); FacadeDemo.Run(); }
public static void Start() { int choice; do { Console.Clear(); Console.WriteLine("------Structural Pattern Demo-------"); Console.WriteLine("Enter Your Choice"); Console.WriteLine("1 To See Adapter Design Pattern"); Console.WriteLine("2 To See Decorator Design Pattern"); Console.WriteLine("3 To See Facade Design Pattern"); Console.WriteLine("0 To Go Back"); Console.WriteLine("------------------------------------"); choice = Convert.ToInt32(Console.ReadLine()); switch (choice) { case 1: FacadeDemo.Start(); break; case 2: DecoratorDemo.Start(); break; case 3: AdapterDemo.Start(); break; case 4: break; default: Console.WriteLine("Please Enter Valid Choice"); break; } } while (choice != 0); }