Exemplo n.º 1
0
        static void Main(string[] args)
        {
            var computer = new ComputerFacade(new Computer());

            computer.TurnOn();
            Console.WriteLine("==========");
            computer.TurnOff();
        }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            Computer       comp = new Computer();
            ComputerFacade cf   = new ComputerFacade(comp);

            cf.TurnOn();
            cf.TurnOff();

            Console.ReadKey();
        }
Exemplo n.º 3
0
        //Facade defines a higher-level interface that makes the subsystem easier to use.
        static void Main(string[] _)
        {
            var computerFacade = new ComputerFacade(new Computer());

            computerFacade.TurnOn();
            Console.WriteLine("\n");
            computerFacade.TurnOff();

            Console.ReadKey();
        }
Exemplo n.º 4
0
        static void Main(string[] args)
        {
            Computer       computer = new Computer();
            Human          human    = new Human();
            ComputerFacade facade   = new ComputerFacade(computer, human);

            facade.TurnOn();

            facade.TurnOff();

            Console.ReadKey();
        }