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/"); }
public WeakReference Parent; // as DB internal SnapShot(IntPtr handle, DB parent) { this.Handle = handle; this.Parent = new WeakReference(parent); }
public void PutToDB(LevelDB.DB db, byte[] key) { var _value = Helper.tagValue_Bytes.Concat(this.Value).ToArray(); db.Put(key, _value); }