示例#1
0
        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);
        }
示例#3
0
        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();
            }
        }