示例#1
0
        public void Run()
        {
            var start = DateTime.Now;

            Console.Out.WriteLine("BaseSearchFolder: " + BaseSearchFolder);
            SearchPaths.ForEach(folder =>
            {
                if (!Path.IsPathRooted(folder) && !string.IsNullOrEmpty(BaseSearchFolder))
                {
                    folder = Path.Combine(BaseSearchFolder, folder);
                }
                int currentCount = bag.Count;
                Console.Out.WriteLine("Analyzing " + folder);
                if (Directory.Exists(folder))
                {
                    findResourcesInFolder(folder, folder);
                    Console.Out.WriteLine("   found " + (bag.Count - currentCount) + " matches...");
                }
                else
                {
                    Console.WriteLine("Error: The directory doesn't exist.");
                }
                Console.Out.WriteLine("");
            });
            Console.Out.WriteLine("Process was completed in " + (DateTime.Now.Subtract(start).TotalMilliseconds + " ms"));

            Task.Run(() => createOutputFile());
        }