public Boolean IsEqualTo(CheckFile file) { bool result = false; if (this.Size == file.Size) result = CompareStreams(this.Stream, file.Stream); return result; }
public bool CompareFiles(CheckFile file1, CheckFile file2) { return file1.IsEqualTo(file2); }
private void FindDuplicateFiles(CheckFile checkFile, ref List<CheckFile> files) { foreach (CheckFile file in files.Where(f => !f.Checked)) { if (checkFile.FilePath != file.FilePath && CompareFiles(checkFile, file)) { file.Checked = true; file.IsDuplicated = true; checkFile.IsDuplicated = true; file.FileId = checkFile.FileId; } } checkFile.Checked = true; }