public List<FileMatchResult> FindUpdatedAssemblies(IFileSystem source, IFileSystem destination) { if (source == null) { throw new ArgumentNullException("source"); } if (destination == null) { throw new ArgumentNullException("destination"); } var potentialMatches = this.folderComparer.FindMatches(source.Folder, destination.Folder); var matchResults = new List<FileMatchResult>(potentialMatches.Count); foreach (var potentialMatch in potentialMatches) { var sourceFile = source.GetFileSystemFile(potentialMatch.SourceFile); var destinationFile = destination.GetFileSystemFile(potentialMatch.DestinationFile); var fileMatch = new FileMatch(potentialMatch.SourceFile, potentialMatch.DestinationFile); var comparsionResult = this.fileComparer.Compare(sourceFile, destinationFile); matchResults.Add(new FileMatchResult(fileMatch, comparsionResult)); } return matchResults; }
private void RunAfterCopyTasks(FileMatch fileMatch) { foreach (var afterCopyTask in this.afterCopyTasks) { afterCopyTask.RunAfterCopy(fileMatch); } }
private void RunBeforeCopyTasks(FileMatch fileMatch) { foreach (var beforeCopyTask in this.beforeCopyTasks) { beforeCopyTask.RunBeforeCopy(fileMatch); } }
public void RunBeforeCopy(FileMatch fileMatch) { var matchFromList = this.fileMatches.Where(x => x.Match.SourceFile == fileMatch.SourceFile).SingleOrDefault(); if (matchFromList != null) { System.Diagnostics.Debug.Write("Starting copy for " + matchFromList.Match.SourceFile); } }
public void RunAfterCopy(FileMatch fileMatch) { var matchFromList = this.fileMatches.Where(x => x.Match.SourceFile == fileMatch.SourceFile).SingleOrDefault(); if (matchFromList != null) { System.Diagnostics.Debug.Write("Finished copy for " + matchFromList.Match.SourceFile); matchFromList.ComparisonResult = FileComparisonResult.Same; } }
public void RunBeforeCopy(FileMatch fileMatch) { if (fileMatch == null) { throw new ArgumentNullException("fileMatch"); } var destinationFilePath = fileMatch.DestinationFile.FilePath; if (System.IO.File.Exists(destinationFilePath)) { this.CheckFileOutFromTfs(destinationFilePath); } }