Exemplo n.º 1
0
        public KeyValueRepository(string folder, DataStoreSerializer dataStoreSerializer)
        {
            Directory.CreateDirectory(folder);
            this.dataStoreSerializer = dataStoreSerializer;

            // Open a connection to a new DB and create if not found
            var options = new DbOptions().SetCreateIfMissing(true);

            this.rocksdb = RocksDb.Open(options, folder);
        }
        public KeyValueRepository(string folder, DataStoreSerializer dataStoreSerializer)
        {
            Directory.CreateDirectory(folder);
            this.dataStoreSerializer = dataStoreSerializer;

            // Open a connection to a new DB and create if not found
            var options = new Options {
                CreateIfMissing = true
            };

            this.leveldb = new DB(options, folder);
        }
 public KeyValueRepository(DataFolder dataFolder, DataStoreSerializer dataStoreSerializer) : this(dataFolder.KeyValueRepositoryPath, dataStoreSerializer)
 {
 }