Operation() публичный Метод

public Operation ( ) : void
Результат void
Пример #1
0
        static void Main(string[] args)
        {
            HandsetBrand phone = new HandsetBrandN();

            phone.SetHandsetSoft(new HandsetGame());
            phone.Run();

            phone.SetHandsetSoft(new HandsetAddressList());
            phone.Run();

            phone = new HandsetBrandM();

            phone.SetHandsetSoft(new HandsetGame());
            phone.Run();

            phone.SetHandsetSoft(new HandsetAddressList());
            phone.Run();

            Console.WriteLine("\n");

            Abstraction abstraction = new Abstraction();

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

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

            Console.ReadLine();
        }
Пример #2
0
        static void Main(string[] args)
        {
            Abstraction ab = new Abstraction();

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

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

            Console.Read();
        }
Пример #3
0
        static void Main(string[] args)
        {
            Abstraction ab = new Abstraction();

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

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

            Console.Read();
        }
Пример #4
0
        private static void Main()
        {
            Abstraction abstraction = new Abstraction(new ConcreteImplementorA());

            abstraction.Operation();
            abstraction = new Abstraction(new ConcreteImplementorB());
            abstraction.Operation();
            Console.ReadLine();
        }
Пример #5
0
 public void ClientCode(Abstraction abstraction)
 {
     Console.WriteLine(abstraction.Operation());
 }