Exemplo n.º 1
0
        public static void Main()
        {
            // Send output to Printer
            IReader r = new KeyboardReader();
            IWriter pw = new PrinterWriter();
            Copy cp = new Copy(r, pw);
            cp.DoWork();

            // Send output to FileStream now 
            IWriter fw = new FileWriter();
            Copy cpf = new Copy(r, fw);
            cpf.DoWork();

            Console.ReadLine();
        }
Exemplo n.º 2
0
        public static void Main()
        {
            // Send output to Printer
            IReader r  = new KeyboardReader();
            IWriter pw = new PrinterWriter();
            Copy    cp = new Copy(r, pw);

            cp.DoWork();

            // Send output to FileStream now
            IWriter fw  = new FileWriter();
            Copy    cpf = new Copy(r, fw);

            cpf.DoWork();

            Console.ReadLine();
        }