예제 #1
0
 public void Push(byte[] chunkID, byte[] data, byte[][] dependencies, byte[][] signatures)
 {
     if (chunkID == null)
     {
         throw new ArgumentNullException("chunkID");
     }
     if (data == null)
     {
         throw new ArgumentNullException("data");
     }
     if (dependencies == null)
     {
         throw new ArgumentNullException("dependencies");
     }
     ldataDependencies.Put(chunkID, dependencies);
     ldata.Put(chunkID, data);
     ldataTopLevels.Put(chunkID, dependencies);
     lsignatures.Put(chunkID, signatures);
     for (int n = 0; n != signatures.Length; n++)
     {
         if (signatures [n] == null)
         {
             throw new ArgumentNullException(string.Format("signatures[{0}]", n), "signature cannot be null");
         }
     }
     for (int n = 0; n != dependencies.Length; n++)
     {
         byte[] dependency = dependencies [n];
         if (dependency == null)
         {
             throw new ArgumentNullException(string.Format("dependencies[{0}]", n), "dependency cannot be null");
         }
         ldataTopLevels.Delete(dependency);
     }
 }
예제 #2
0
 public override void Delete(byte[] key)
 {
     baseStorage.Delete(key);
 }