Пример #1
0
 internal void Initilize()
 {
     string tempPath = Path.GetTempPath();
     string randName = Path.GetRandomFileName();
     LevelDB.Cache c = new LevelDB.Cache(100 * 1024 * 1024);
     var options = new Options()
     {
         BlockCache = c,
         CreateIfMissing = true,
     };
     Database = new LevelDB.DB(options, "tmp/data/.sso/");
 }
Пример #2
0
        public WeakReference Parent;  // as DB

        internal SnapShot(IntPtr handle, DB parent)
        {
            this.Handle = handle;
            this.Parent = new WeakReference(parent);
        }
Пример #3
0
        public void PutToDB(LevelDB.DB db, byte[] key)
        {
            var _value = Helper.tagValue_Bytes.Concat(this.Value).ToArray();

            db.Put(key, _value);
        }