Example #1
0
        public static DataTest Read(string fileName, IScorpioReader reader)
        {
            var ret = new DataTest();

            ret._TestID   = reader.ReadInt32();
            ret._testEnum = (TestEnum)reader.ReadInt32();
            {
                List <Int3> list   = new List <Int3>();
                int         number = reader.ReadInt32();
                for (int i = 0; i < number; ++i)
                {
                    list.Add(Int3.Read(fileName, reader));
                }
                ret._TestDate = list.AsReadOnly();
            }
            ret.m_IsInvalid = ret.CheckInvalid();
            return(ret);
        }
Example #2
0
        public TableTest Initialize(string fileName, IScorpioReader reader)
        {
            var iRow = TableUtil.ReadHead(reader, fileName, FILE_MD5_CODE);

            for (var i = 0; i < iRow; ++i)
            {
                var pData = DataTest.Read(fileName, reader);
                if (m_dataArray.ContainsKey(pData.ID()))
                {
                    m_dataArray[pData.ID()].Set(pData);
                }
                else
                {
                    m_dataArray.Add(pData.ID(), pData);
                }
            }
            m_count = m_dataArray.Count;
            return(this);
        }
Example #3
0
 public void Set(DataTest value)
 {
     this._TestID   = value._TestID;
     this._testEnum = value._testEnum;
     this._TestDate = value._TestDate;
 }