public static void GetListOfUniqueDirsAndUniqueFileNames(
            List <FilePathAbsolute> listOfFilePath,
            out List <DirectoryPathAbsolute> listOfUniqueDirs,
            out List <string> listOfUniqueFileNames)
        {
            listOfUniqueDirs      = new List <DirectoryPathAbsolute>();
            listOfUniqueFileNames = new List <string>();

            if (listOfFilePath == null)
            {
                return;
            }

            foreach (FilePathAbsolute filePath in listOfFilePath)
            {
                if (PathHelper.IsNullOrEmpty(filePath))
                {
                    continue;
                }
                DirectoryPathAbsolute dir = filePath.ParentDirectoryPath;
                if (!ListOfPathHelper.Contains(listOfUniqueDirs, dir))
                {
                    listOfUniqueDirs.Add(dir);
                }

                string fileName = filePath.FileName;
                Debug.Assert(fileName != null && fileName.Length > 0);
                if (!ListOfStringHelperContainsIgnoreCase(listOfUniqueFileNames, fileName))
                {
                    listOfUniqueFileNames.Add(fileName);
                }
            } // end foreach
        }
        public void Test_ListOfPathContains()
        {
            // Null and empty lists
            Assert.IsFalse(ListOfPathHelper.Contains(null, new FilePathAbsolute(@"E:\Path1\Path2\File.txt")));
            List <FilePathAbsolute> listIn = new List <FilePathAbsolute>();

            Assert.IsFalse(ListOfPathHelper.Contains(listIn, new FilePathAbsolute(@"E:\Path1\Path2\File.txt")));

            // List contains null
            listIn.Add(null);
            Assert.IsTrue(ListOfPathHelper.Contains(listIn, null));

            // List contains empty path
            listIn.Add(FilePathAbsolute.Empty);
            Assert.IsTrue(ListOfPathHelper.Contains(listIn, FilePathAbsolute.Empty));

            listIn.Add(new FilePathAbsolute(@"E:\Path1\Path2\File.txt"));
            Assert.IsTrue(ListOfPathHelper.Contains(listIn, new FilePathAbsolute(@"E:\Path1\Path2\File.txt")));


            List <DirectoryPath> listIn1 = new List <DirectoryPath>();

            listIn1.Add(new DirectoryPathAbsolute(@"E:\Path1\Path2"));
            listIn1.Add(new DirectoryPathRelative(@"..\Path1\Path2"));
            Assert.IsTrue(ListOfPathHelper.Contains <DirectoryPath>(listIn1, new DirectoryPathRelative(@"..\Path1\Path2")));
        }