示例#1
0
文件: DB.cs 项目: robpaveza/mc-mapper
        /// <summary>
        /// Open the database with the specified "name".
        /// </summary>
        public DB(Options options, string name, Encoding encoding)
        {
            IntPtr error;

            this._Cache      = options.Cache;
            this._InfoLog    = options.InfoLog;
            this._Comparator = options.Comparator;
            this.Handle      = LevelDBInterop.leveldb_open(options.Handle, name, out error);
            this._encoding   = encoding;

            Throw(error, msg => new UnauthorizedAccessException(msg));
        }