Пример #1
0
        static void Main(string[] args)
        {
            Invoker invoker = new Invoker();
            //Examples each for type
            NetworkCredential credentials = new NetworkCredential("username", "password");

            invoker.SetCommand(new HTTPCommand("https://google.com/allinternet.txt", "all_internet_on_my_pc.txt"));
            invoker.SetCommand(new FTPCommand("ftp://example_ftp_link/weird_things.txt", "weird_things_on_my_pc.txt", credentials));
            invoker.SetCommand(new CopyCommand("source.txt", "destination.txt"));
            invoker.SetCommand(new RandomCommand("new_file.txt"));
            invoker.Finish();
        }