Ejemplo n.º 1
0
        public NativeTests()
        {
            var tempPath = Path.GetTempPath();
            var randName = Path.GetRandomFileName();

            DatabasePath = Path.Combine(tempPath, randName);
            var options = LevelDBInterop.leveldb_options_create();

            LevelDBInterop.leveldb_options_set_create_if_missing(options, 1);
            IntPtr error;

            Database = LevelDBInterop.leveldb_open(options, DatabasePath, out error);
            LevelDBException.Check(error);
        }