Search() public method

public Search ( DuplicateSearchOption option ) : List
option DuplicateSearchOption
return List
Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            log4net.Config.XmlConfigurator.Configure();
            Logger.Debug("Hello World");

            ArchiveDuplicateDetector worker = new ArchiveDuplicateDetector();
            worker.Notify +=new ArchiveDuplicateDetector.NotifyEventHandler(worker_Notify);

            List<string> paths = new List<string>();
            paths.Add(@"D:\New Folder");
            DuplicateSearchOption option = new DuplicateSearchOption() { Paths = paths };
            List<DuplicateArchiveInfoList> list = worker.Search(option);

            foreach (var item in list)
            {
                System.Console.WriteLine(item.Original.ToString());
                foreach (var dup in item.Duplicates)
                {
                    System.Console.WriteLine(" - " + dup.ToString());
                }
            }

            System.Console.ReadLine();
        }