Пример #1
0
        public void Deserialize(Package package)
        {
            if (Ptr.OffsetInFile == 0)
            {
                Ptr = ChunkPtr.Deserialize(package);
            }

            var offset = package.FileOffset;

            package.FileOffset = Ptr.OffsetInFile;
            _linkedObject      = new T();
            if (package.Header.Version < PackageVersion.Hydra_V0_1)
            {
                _linkedObject.Deserialize(package, Ptr.EntryCount);
            }
            else
            {
                _linkedObject.Deserialize(package);
            }
            package.FileOffset = offset;
        }
Пример #2
0
 public void Deserialize(Package package)
 {
     Version = (PackageVersion)package.ReadUInt16();
     Flags.SetFlag(package.ReadUInt16());
     ObjectTablePtr = ChunkPtr.Deserialize(package);
 }