public DataRow(IDataSheet sheet, int key, int offset) : base(sheet, key, offset + MetadataLength) { var b = sheet.GetBuffer(); if (b.Length < offset + MetadataLength) throw new IndexOutOfRangeException(); Length = OrderedBitConverter.ToInt32(b, offset, true); SubRowCount = OrderedBitConverter.ToInt16(b, offset + 4, true); }
public DataRow(IDataSheet sheet, int key, int offset) : base(sheet, key, offset + MetadataLength) { byte[] b = sheet.GetBuffer(); if (b.Length < offset + MetadataLength) { throw new IndexOutOfRangeException(); } Length = OrderedBitConverter.ToInt32(b, offset, true); SubRowCount = OrderedBitConverter.ToInt16(b, offset + 4, true); }
public DataRow(IDataSheet sheet, int key, int offset) : base(sheet, key, offset + MetadataLength) { var b = sheet.GetBuffer(); if (b.Length < offset + MetadataLength) { throw new IndexOutOfRangeException(); } Length = OrderedBitConverter.ToInt32(b, offset, true); var c = OrderedBitConverter.ToInt16(b, offset + 4, true); if (c != 1) { throw new InvalidDataException(); } }