C# Design Patters4 13# Flyweight패턴 Structural Patterns static void Main(string[] args) { //BuilderExample(); //FactoryExample(); //FactoryMethodExample(); //FactoryMethodExample2(); //ProtoTypeExample(); //SingletonExample(); //AdapterExample(); //BridgeExample(); //CompositeExample(); //DecoratorExample(); //FacadeExample(); FlyweightExample(); //Console.WriteLine("Hello World!"); Console.ReadKey(); } static void FlyweightExample() { string documen.. 2019. 6. 19. 12# Facade패턴 Structural Patterns static void Main(string[] args) { //BuilderExample(); //FactoryExample(); //FactoryMethodExample(); //FactoryMethodExample2(); //ProtoTypeExample(); //SingletonExample(); //AdapterExample(); //BridgeExample(); //CompositeExample(); //DecoratorExample(); FacadeExample(); //Console.WriteLine("Hello World!"); Console.ReadKey(); } static void FacadeExample() { Mortgage mortgage = new Mortgage(); Cus.. 2019. 6. 3. 11# Decorator패턴 Structural Patterns static void Main(string[] args) { //BuilderExample(); //FactoryExample(); //FactoryMethodExample(); //FactoryMethodExample2(); //ProtoTypeExample(); //SingletonExample(); //AdapterExample(); //BridgeExample(); //CompositeExample(); DecoratorExample(); //Console.WriteLine("Hello World!"); Console.ReadKey(); } static void DecoratorExample() { Book book = new Book("Worley", "Inside asp.net", 10); b.. 2019. 6. 3. 09# Bridge패턴 Structural Patterns static void Main(string[] args) { //BuilderExample(); //FactoryExample(); //FactoryMethodExample(); //FactoryMethodExample2(); //ProtoTypeExample(); //SingletonExample(); //AdapterExample(); BridgeExample(); //Console.WriteLine("Hello World!"); Console.ReadKey(); } static void BridgeExample() { Customers customers = new Customers("Chicago") { DataObject = new CustomersData() }; customers.ShowRec.. 2019. 5. 29. 이전 1 다음