Exemplo n.º 1
0
        public HNBlock(int blockIndex, BlockDataDTO bytes)
        {
            this._bytes = bytes;

            this.PageMapOffset = BitConverter.ToUInt16(this._bytes.Data, 0);
            this.PageMap = new HNPAGEMAP(this._bytes.Data, this.PageMapOffset);
            if (blockIndex == 0)
            {
                this.Header = new HNHDR(this._bytes.Data);
            } else if (blockIndex % 128 == 8)
            {
                this.BitMapPageHeader = new HNBITMAPHDR(ref this._bytes.Data);
            } else
            {
                this.PageHeader = new HNPAGEHDR(ref this._bytes.Data);
            }
        }
Exemplo n.º 2
0
        public HNBlock(int blockIndex, BlockDataDTO bytes)
        {
            _bytes = bytes;

            PageMapOffset = BitConverter.ToUInt16(_bytes.Data, 0);
            PageMap       = new HNPAGEMAP(_bytes.Data, PageMapOffset);
            if (blockIndex == 0)
            {
                Header = new HNHDR(_bytes.Data);
            }
            else if (blockIndex % 128 == 8)
            {
                BitMapPageHeader = new HNBITMAPHDR(ref _bytes.Data);
            }
            else
            {
                PageHeader = new HNPAGEHDR(ref _bytes.Data);
            }
        }
Exemplo n.º 3
0
        public HNBlock(int blockIndex, BlockDataDTO bytes)
        {
            this._bytes = bytes;

            this.PageMapOffset = BitConverter.ToUInt16(this._bytes.Data, 0);
            this.PageMap       = new HNPAGEMAP(this._bytes.Data, this.PageMapOffset);
            if (blockIndex == 0)
            {
                this.Header = new HNHDR(this._bytes.Data);
            }
            else if (blockIndex % 128 == 8)
            {
                this.BitMapPageHeader = new HNBITMAPHDR(ref this._bytes.Data);
            }
            else
            {
                this.PageHeader = new HNPAGEHDR(ref this._bytes.Data);
            }
        }