public FileHeader(string filename, string basepath, IFileHashProvider hasher) { var fileinfo = new FileInfo(Path.Combine(basepath, filename)); this.FileName = fileinfo.Name; this.FileSize = fileinfo.Length; this.RelativePath = filename.Substring(0, filename.Length - fileinfo.Name.Length); this.ContentsHash = hasher.ComputeHash(fileinfo.FullName); }
public ImageRepository(IFileHashProvider hashProvider) { HashProvider = hashProvider; }