public void TestRead()
        {

            byte[] data = new byte[22];
            LittleEndian.PutShort(data, 0, DVALRecord.sid);
            LittleEndian.PutShort(data, 2, (short)18);
            LittleEndian.PutShort(data, 4, (short)55);
            LittleEndian.PutInt(data, 6, 56);
            LittleEndian.PutInt(data, 10, 57);
            LittleEndian.PutInt(data, 14, 58);
            LittleEndian.PutInt(data, 18, 59);

            RecordInputStream in1 = new RecordInputStream(new MemoryStream(data));
            in1.NextRecord();
            DVALRecord dv = new DVALRecord(in1);

            Assert.AreEqual(55, dv.Options);
            Assert.AreEqual(56, dv.HorizontalPos);
            Assert.AreEqual(57, dv.VerticalPos);
            Assert.AreEqual(58, dv.ObjectID);
            if (dv.DVRecNo == 0)
            {
                Assert.Fail("Identified bug 44510");
            }
            Assert.AreEqual(59, dv.DVRecNo);
        }
 public DataValidityTable(RecordStream rs)
 {
     _headerRec = (DVALRecord)rs.GetNext();
     IList temp = new ArrayList();
     while (rs.PeekNextClass() == typeof(DVRecord))
     {
         temp.Add(rs.GetNext());
     }
     _validationList = temp;
 }
Beispiel #3
0
        public override Object Clone()
        {
            DVALRecord rec = new DVALRecord();

            rec.field_1_options   = field_1_options;
            rec.field_2_horiz_pos = field_2_horiz_pos;
            rec.field_3_vert_pos  = field_3_vert_pos;
            rec.field_cbo_id      = this.field_cbo_id;
            rec.field_5_dv_no     = this.field_5_dv_no;
            return(rec);
        }
 public DataValidityTable()
 {
     _headerRec = new DVALRecord();
     _validationList = new ArrayList();
 }
Beispiel #5
0
 public override Object Clone()
 {
     DVALRecord rec = new DVALRecord();
     rec.field_1_options = field_1_options;
     rec.field_2_horiz_pos = field_2_horiz_pos;
     rec.field_3_vert_pos = field_3_vert_pos;
     rec.field_cbo_id = this.field_cbo_id;
     rec.field_5_dv_no = this.field_5_dv_no;
     return rec;
 }
 public override void Dispose()
 {            
     _validationList = null;
     _headerRec = null;
 }