コード例 #1
0
 public ObjectInfo UpdateObject(ObjectInfo o, string packedHash) {
     lock (Objects) {
         Objects[o.Checksum] = packedHash;
     }
     return new ObjectInfo(o.Checksum, packedHash);
 }
コード例 #2
0
 public bool RemoveObject(ObjectInfo info) {
     return RemoveObject(info.Checksum);
 }
コード例 #3
0
 public ObjectInfo AddObject(string unpackedHash, string packedHash) {
     lock (Objects) {
         var o = GetObject(unpackedHash);
         if (o == null) {
             o = new ObjectInfo(unpackedHash, packedHash);
             Objects.Add(o.Checksum, o.ChecksumPack);
         } else
             o = UpdateObject(o, packedHash);
         return o;
     }
 }