Exemplo n.º 1
0
        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);
            }));
        }
Exemplo n.º 2
0
 public TargetDirectory(MetadataStorage metadataStorage, string directoryName, Dictionary <string, List <ITargetFileVersion> > files)
 {
     this.MetadataStorage = metadataStorage;
     this.DirectoryName   = directoryName;
     this.Files           = files;
 }