public void ProcessFiles(string filePath, List <IInteruptRule> rules) { foreach (var rule in rules) { if (CheckRules(rule, filePath)) { break; } } if (CheckImageName(filePath)) { _fileService.AddPage(filePath); _directoryService.MoveFile(filePath, _processingFolder); } else { if (File.Exists(filePath)) { _directoryService.MoveFile(filePath, _errorFolder); } } }