Exemplo n.º 1
0
        static void Main(string[] args)
        {
            try {
                //get starting directory
                ArgParser parse = new ArgParser("d*", args);
                string directory = parse.getString('d');

                //really doesn't need to be parallel, is cool though.
                Parallel.ForEach<String>(FileUtil.RecurseFiles(directory), (String file) => {
                    new Printer(file);
                });
            }
            catch (Exception ex)
            {
                Console.WriteLine(System.AppDomain.CurrentDomain.FriendlyName + " -d C:\\DirectoryToPrint");
                Console.WriteLine("Prints recursively... ");
            }
        }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            try {
                //get starting directory
                ArgParser parse     = new ArgParser("d*", args);
                string    directory = parse.getString('d');

                //really doesn't need to be parallel, is cool though.
                Parallel.ForEach <String>(FileUtil.RecurseFiles(directory), (String file) => {
                    new Printer(file);
                });
            }
            catch (Exception ex)
            {
                Console.WriteLine(System.AppDomain.CurrentDomain.FriendlyName + " -d C:\\DirectoryToPrint");
                Console.WriteLine("Prints recursively... ");
            }
        } //end main