public void PutArtifact(ArtifactInfo info, System.IO.Stream stream)
        {
            var jss = new JsonSerializer<ArtifactObject>();

            long ctr = client.IncrementValue(fileNameCounterKey);

            string fileName = filePrefix + "/" + ctr + ".artifact";

            client.AddItemToList(artifactListKey, jss.Serialize(info));

            using(var fs = File.Create(fileName))
            {
                stream.CopyTo(fs);
            }
        }
        public void PutArtifact(ArtifactInfo info, Stream stream)
        {
            using(var myLock = client.AcquireLock(lockKey))
            {
                long number = client.IncrementValue(artifactCounterKey);

                string infoString = jss.Serialize(info);
                client.SetEntry(MakeArtifactInfoKey(number), infoString);

                string fileName = MakeArtifactFilename(number-1);

                using(var fs = File.OpenWrite(fileName))
                {
                    stream.CopyTo(fs);
                }
            }
        }
 public ArtifactInfo(ArtifactInfo ai)
 {
     this.Name        = ai.Name;
     this.Description = ai.Description;
     this.FileName    = ai.FileName;
 }
 public ArtifactInfo(ArtifactInfo ai)
 {
     this.Name = ai.Name;
     this.Description = ai.Description;
     this.FileName = ai.FileName;
 }