コード例 #1
0
ファイル: DataRecord.cs プロジェクト: turpija11/TpsParser
 public DataRecord(TpsRecord tpsRecord, TableDefinitionRecord tableDefinition)
 {
     Record          = tpsRecord ?? throw new ArgumentNullException(nameof(tpsRecord));
     TableDefinition = tableDefinition ?? throw new ArgumentNullException(nameof(tableDefinition));
     Header          = (DataHeader)Record.Header;
     Values          = TableDefinition.Parse(tpsRecord.Data.GetRemainder());
 }
コード例 #2
0
        public TableNameRecord(TpsRecord record)
        {
            if (record == null)
            {
                throw new ArgumentNullException(nameof(record));
            }

            Header      = (TableNameHeader)record.Header;
            TableNumber = record.Data.LongBE();
        }
コード例 #3
0
        public IndexRecord(TpsRecord tpsRecord)
        {
            if (tpsRecord == null)
            {
                throw new ArgumentNullException(nameof(tpsRecord));
            }

            Header = (IndexHeader)tpsRecord.Header;

            var data = tpsRecord.Data;

            data.JumpAbsolute(data.Length - 4);

            RecordNumber = data.LongBE();
        }