Beispiel #1
0
        protected virtual void Read()
        {
            _SubRows.Clear();

            var h = Sheet.Header;
            var b = Sheet.GetBuffer();
            var o = Offset;

            for (var i = 0; i < SubRowCount; ++i)
            {
                var key = OrderedBitConverter.ToInt16(b, o, true);
                o += 2;

                var r = new SubRow(this, key, o);
                _SubRows.Add(key, r);

                o += h.FixedSizeDataLength;
            }

            _IsRead = true;
        }
        protected virtual void Read()
        {
            _SubRows.Clear();

            Header h = Sheet.Header;

            byte[] b = Sheet.GetBuffer();
            int    o = Offset;

            for (int i = 0; i < SubRowCount; ++i)
            {
                short key = OrderedBitConverter.ToInt16(b, o, true);
                o += 2;

                SubRow r = new SubRow(this, key, o);
                _SubRows.Add(key, r);

                o += h.FixedSizeDataLength;
            }

            _IsRead = true;
        }
Beispiel #3
0
        protected virtual void Read()
        {
            _ColumnCache.Clear();
            _SubRows.Clear();

            var h = Sheet.Header;
            foreach (var c in h.Columns)
                _ColumnCache.Add(c.Index, new ColumnValues(c));

            var b = Sheet.GetBuffer();
            var o = Offset;
            for(var i = 0; i < SubRowCount; ++i) {
                var key = OrderedBitConverter.ToInt16(b, o, true);

                var r = new SubRow(this, key);
                _SubRows.Add(key, r);

                foreach(var c in _ColumnCache.Values) {
                    var value = c.Column.Read(b, this, o + 2 + c.Column.Offset);
                    r.Values.Add(c.Column.Index, value);
                    c.Values.Add(key, value);

                    var rawValue = c.Column.ReadRaw(b, this, o + 2 + c.Column.Offset);
                    r.RawValues.Add(c.Column.Index, rawValue);
                    c.RawValues.Add(key, rawValue);
                }

                o += 2 + h.FixedSizeDataLength;
            }

            _IsRead = true;
        }