public File(string path, IFileService fileService, ICheckSumService checkSumService) { if (string.IsNullOrEmpty(path)) { throw new ArgumentNullException("path"); } Path = path; if (fileService == null) { throw new ArgumentNullException("fileService"); } _fileService = fileService; if (!_fileService.Exists(path)) { throw new ArgumentException("path", "File does not exists."); } if (checkSumService == null) { throw new ArgumentNullException("checkSumService"); } _checkSumService = checkSumService; }
public FileService(ICheckSumService checkSumService) { _checkSumService = Throw.IfNull(checkSumService, "checkSumService"); }
public CheckSumController(INumericValidator validator, ICheckSumService service) { Validator = validator; Service = service; }