예제 #1
0
        public new static SubRecord ReadBase(Stream stream)
        {
            BinaryReader reader = new BinaryReader(stream);
            SubRecord    record = new SubRecord();

            record.Type = reader.ReadUInt16();
            record.Size = reader.ReadUInt16();
            record.Data = reader.ReadBytes(record.Size);
            return(record);
        }
예제 #2
0
        public override void Decode()
        {
            MemoryStream stream = new MemoryStream(Data);

            SubRecords = new List <SubRecord>();
            while (stream.Position < Size)
            {
                SubRecords.Add(SubRecord.Read(stream));
            }
        }
예제 #3
0
        public static SubRecord Read(Stream stream)
        {
            SubRecord record = SubRecord.ReadBase(stream);

            switch (record.Type)
            {
            case SubRecordType.CommonObjectData:
                return(new CommonObjectData(record));

            case SubRecordType.GroupMarker:
                return(new GroupMarker(record));

            case SubRecordType.End:
                return(new End(record));

            default:
                return(record);
            }
        }
예제 #4
0
 public GroupMarker(SubRecord record) : base(record)
 {
 }
예제 #5
0
 public SubRecord(SubRecord record) : base(record)
 {
 }
예제 #6
0
 public CommonObjectData(SubRecord record) : base(record)
 {
 }
예제 #7
0
파일: End.cs 프로젝트: fabrimaciel/colosoft
 public End(SubRecord record) : base(record)
 {
 }