public PayloadReader(PageLoader pageLoader, UInt64 pageNumber, UInt64 payloadPosition, UInt64 payloadOffset, UInt64 payloadSize) : base(pageLoader) { this.LoadPage(pageNumber); this.Position = payloadPosition + payloadOffset; this._payloadSize = payloadSize; this._payloadSizeOnPage = this.CalculatePayloadSizeOfFirstPage(payloadSize); this._payloadSizeOnPage -= payloadOffset; // 0 for header, header length for body this._nextPage = 0; this._bytesRead = 0; this._bytesReadOnPage = 0; this._isFirstPage = true; }
protected virtual void Dispose(Boolean disposing) { if (!this._isDisposed) { if (disposing) { this._pageReader = null; this._pageLoader = null; if (this._stream != null) { this._stream.Close(); this._stream.Dispose(); this._stream = null; } } this._isDisposed = true; } }
public PageReader(PageLoader pageLoader) { this._pageLoader = pageLoader; this._bytes = new Byte[this._pageLoader.PageSize]; }
private void Open(Stream stream) { this._pageLoader = new PageLoader(stream, this.FileHeader); this._pageReader = new PageReader(this._pageLoader); }