示例#1
0
文件: DB.cs 项目: bkwcl/LevelDB
        /// <summary>
        /// If a DB cannot be opened, you may attempt to call this method to
        /// resurrect as much of the contents of the database as possible.
        /// Some data may be lost, so be careful when calling this function
        /// on a database that contains important information.
        /// </summary>
        public static void Repair(Options options, string name)
        {
            IntPtr error;

            LevelDBInterop.leveldb_repair_db(options.Handle, name, out error);
            Throw(error);
        }
示例#2
0
文件: DB.cs 项目: uxwine/leveldb.net
        /// <summary>
        /// If a DB cannot be opened, you may attempt to call this method to
        /// resurrect as much of the contents of the database as possible.
        /// Some data may be lost, so be careful when calling this function
        /// on a database that contains important information.
        /// Options should not be modified after calling this method.
        /// </summary>
        public static void Repair(string name, Options options)
        {
            IntPtr error;

            LevelDBInterop.leveldb_repair_db(options.Handle, name, out error);
            LevelDBException.Check(error);
            GC.KeepAlive(options);
        }