コード例 #1
0
        public FileReaderV8(HeaderPage header, DiskService disk)
        {
            _collections = header.GetCollections().ToDictionary(x => x.Key, x => x.Value);

            // using writer stream from pool (no need to return)
            _stream = disk.GetPool(FileOrigin.Data).Writer;
        }
コード例 #2
0
        public FileReaderV8(HeaderPage header, DiskService disk)
        {
            this.UserVersion = header.UserVersion;

            _collections = header.GetCollections().ToDictionary(x => x.Key, x => x.Value);

            // using writer stream from pool (no need to return)
            _stream = disk.GetPool(FileOrigin.Data).Writer;

            _buffer = BufferPool.Rent(PAGE_SIZE);
        }
コード例 #3
0
ファイル: FileReaderV8.cs プロジェクト: swpuzhang/LiteDB
        public FileReaderV8(HeaderPage header, DiskService disk)
        {
            // get a copy of pragmas
            this.Pragmas = new EnginePragmas(header.UpdateBuffer(), header);

            _collections = header.GetCollections().ToDictionary(x => x.Key, x => x.Value);

            // using writer stream from pool (no need to return)
            _stream = disk.GetPool(FileOrigin.Data).Writer;

            _buffer = BufferPool.Rent(PAGE_SIZE);
        }