コード例 #1
0
        protected void CompareManifestsRecursiveSource(
            ManifestDirectoryInfo sourceDir,
            ManifestDirectoryInfo destDir,
            HashSet <ManifestFileInfo> destFileMatch)
        {
            foreach (ManifestFileInfo sourceFile in sourceDir.Files.Values)
            {
                if (destDir != null &&
                    destDir.Files.ContainsKey(sourceFile.Name))
                {
                    ManifestFileInfo destFile = destDir.Files[sourceFile.Name];
                    destFileMatch.Add(destFile);

                    if (sourceFile.FileHash.Equals(destFile.FileHash) == false)
                    {
                        ChangedFiles.Add(sourceFile, destFile);
                    }
                    else
                    {
                        if (Manifest.CompareManifestDates(
                                sourceFile.LastModifiedUtc,
                                destFile.LastModifiedUtc) == false)
                        {
                            LastModifiedDateFiles.Add(sourceFile, destFile);
                        }

                        if (Manifest.CompareManifestDates(
                                sourceFile.RegisteredUtc,
                                destFile.RegisteredUtc) == false)
                        {
                            RegisteredDateFiles.Add(sourceFile, destFile);
                        }
                    }
                }
                else
                {
                    SourceOnlyFiles.Add(sourceFile);
                }
            }

            foreach (ManifestDirectoryInfo nextSourceDir in
                     sourceDir.Subdirectories.Values)
            {
                ManifestDirectoryInfo nextDestDir = null;
                if (destDir != null &&
                    destDir.Subdirectories.ContainsKey(nextSourceDir.Name))
                {
                    nextDestDir = destDir.Subdirectories[nextSourceDir.Name];
                }

                CompareManifestsRecursiveSource(
                    nextSourceDir,
                    nextDestDir,
                    destFileMatch);
            }
        }
コード例 #2
0
 public void Clear()
 {
     SourceOnlyFiles.Clear();
     DestOnlyFiles.Clear();
     ChangedFiles.Clear();
     LastModifiedDateFiles.Clear();
     RegisteredDateFiles.Clear();
     MovedFiles.Clear();
     MovedFileOrder.Clear();
     ErrorFiles.Clear();
 }