예제 #1
0
        static void Main(string[] args)
        {
            Abstraction ab = new RefinedAbstraction();

            ab.SetImplementor(new ConcreteImplementorA());
            ab.Operation();
        }
예제 #2
0
        static void Main(string[] args)
        {
            Implementor implementor = new ConcreteImplementA();
            Abstraction abstraction = new RefinedAbstraction(implementor);

            abstraction.Operation();

            Console.Read();
        }
예제 #3
0
        static void Main(string[] args)
        {
            Abstraction ab = new RefinedAbstraction();
            ab.Implementor = new ConcreateImplementorA();
            ab.Operation();

            ab.Implementor = new ConcreateImplementorB();
            ab.Operation();

            Console.ReadKey();
        }
예제 #4
0
파일: Program.cs 프로젝트: niuniuliu/CSharp
        static void Main(string[] args)
        {
            Abstraction ab = new RefinedAbstraction();

            ab.SetImplementor(new ConcreteImplementorA());
            ab.Operation();

            ab.SetImplementor(new ConcreteImplementorB());
            ab.Operation();

            Console.Read();
        }
예제 #5
0
        static void Main(string[] args)
        {
            Abstraction ab = new RefinedAbstraction();

            ab.Implementor = new ConcreateImplementorA();
            ab.Operation();

            ab.Implementor = new ConcreateImplementorB();
            ab.Operation();

            Console.ReadKey();
        }
예제 #6
0
        static void Main(string[] args)
        {
            Abstraction ab = new RefinedAbstraction();

            ab.SetImplementor(new ConcreteImplementorA());
            ab.Operation();
            ab.SetImplementor(new ConcreteImplementorB());
            ab.Operation();
            Abstraction ab2 = new RefinedAbstraction2();

            ab2.SetImplementor(new ConcreteImplementorA());
            ab2.Operation();
            ab2.SetImplementor(new ConcreteImplementorB());
            ab2.Operation();
            Console.Read();
        }