private List <HFile> GetFiles(SnapshotLocation snapshotLocation) { BlackList blackList = GetBlackList(snapshotLocation); IEnumerable <HFile> files = snapshotRepository.EnumerateFiles(snapshotLocation, blackList); return(files.ToList()); }
// todo: Instead of receiving an IRemoveDuplicatesExporter, make this handler async and return a promise. // The real work will run asynchronously, while the promise will raise events whenever something important // happened that the presentation layer should handle. protected override void Handle(RemoveDuplicatesRequest request) { this.request = request; DiskPathCollection blackListPathsLeft = blackListRepository.Get(request.SnapshotLeft.PotName); BlackList blackListLeft = new(blackListPathsLeft); DiskPathCollection blackListPathsRight = blackListRepository.Get(request.SnapshotRight.PotName); BlackList blackListRight = new(blackListPathsRight); FileDuplicates fileDuplicates = new() { FilesLeft = snapshotRepository.EnumerateFiles(request.SnapshotLeft, blackListLeft).ToList(), FilesRight = snapshotRepository.EnumerateFiles(request.SnapshotRight, blackListRight).ToList(), CheckFilesExistence = true }; RemoveDuplicates(fileDuplicates); }