public Task UploadFile(string filename, string originalHash, long originalSize) { return(Task.Run(() => { if (!this.Files.ContainsKey(filename)) { this.Files[filename] = new List <ITargetFileVersion>(); } var fileVersion = new TargetFileVersion(filename, originalHash, DateTime.UtcNow, originalSize); this.Files[filename].Add(fileVersion); MetadataStorage.AddBlob(fileVersion); })); }
public TargetDirectory(MetadataStorage metadataStorage, string directoryName, Dictionary <string, List <ITargetFileVersion> > files) { this.MetadataStorage = metadataStorage; this.DirectoryName = directoryName; this.Files = files; }