Exemplo n.º 1
0
        public TableNameRecord(TPSRecord tpsRecord)
        {
            RandomAccess ra = new RandomAccess();

            ra.OpenStream(new MemoryStream(tpsRecord.RecordData));


            ra.jumpRelative(1);                                                                  //skip the first byte in the header

            _tableName = ra.fixedLengthString(tpsRecord.HeaderLength - (int)ra.position).Trim(); //the rest of the header is the name
            _tableID   = ra.beLong();                                                            //followed by the table ID


            if (_tableName == null)
            {
                _tableName = "NULL_NAME_" + _tableID.ToString();
            }
            ra = null;
        }