Example #1
0
        public override void Read(PkgBinaryReader reader)
        {
            UInt32 numElements = reader.ReadUInt32();

            for (int i = 0; i < numElements; ++i)
            {
                T val = elementFactory(ParentFile);
                Elements.Add(val);
                val.Read(reader);
            }
        }
        public override void Read(PkgBinaryReader reader)
        {
            var magic = reader.ReadUInt32();

            if (magic != Magic)
            {
                throw new FileFormatException("This is not a pkg file.");
            }
            name = reader.ReadString(4);

            Elements[0].Read(reader);
            Elements[1].Read(reader);
        }
Example #3
0
 public override void Read(PkgBinaryReader reader)
 {
     NameOffsetType = reader.ReadOffsetType();
     base.Read(reader);
     Unknown = reader.ReadUInt32();
 }