본문 바로가기

C#39

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.
10# Composite패턴 Structural Patterns static void Main(string[] args) { //BuilderExample(); //FactoryExample(); //FactoryMethodExample(); //FactoryMethodExample2(); //ProtoTypeExample(); //SingletonExample(); //AdapterExample(); //BridgeExample(); CompositeExample(); //Console.WriteLine("Hello World!"); Console.ReadKey(); } static void CompositeExample() { CompositeElement root = new CompositeElement("Picture"); root.Add(new Primiti.. 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.