コード例 #1
0
        public EsfNode Parse(BinaryReader reader)
        {
            reader.BaseStream.Seek(0, SeekOrigin.Begin);
            Header = ReadHeader(reader);
            uint nodeNameOffset  = reader.ReadUInt32();
            long restorePosition = reader.BaseStream.Position;

            reader.BaseStream.Seek(nodeNameOffset, SeekOrigin.Begin);
            ReadNodeNames(reader);
            reader.BaseStream.Seek(restorePosition, SeekOrigin.Begin);
            EsfNode result = Decode(reader);

            result.Codec = this;
            return(result);
        }
コード例 #2
0
ファイル: EsfCodec.cs プロジェクト: pingyiqing/EditSF
        public EsfNode Parse(BinaryReader reader)
        {
            reader.BaseStream.Seek(0L, SeekOrigin.Begin);
            Header = ReadHeader(reader);
            uint num      = reader.ReadUInt32();
            long position = reader.BaseStream.Position;

            reader.BaseStream.Seek(num, SeekOrigin.Begin);
            ReadNodeNames(reader);
            reader.BaseStream.Seek(position, SeekOrigin.Begin);
            EsfNode esfNode = Decode(reader);

            esfNode.Codec = this;
            return(esfNode);
        }