Ejemplo n.º 1
0
        public static TypeNode Read(DataReader reader)
        {
            TypeNode tn = new TypeNode();

            tn.Type = reader.ReadString();
            tn.Name = reader.ReadString();
            tn.ByteSize = reader.ReadInt32();
            tn.Index = reader.ReadInt32();
            tn.IsArray = reader.ReadInt32();
            tn.Version = reader.ReadInt32();
            tn.MetaFlag = reader.ReadInt32();

            int numberOfChildren = reader.ReadInt32();
            tn.Children = new TypeNode[numberOfChildren];

            for (int i = 0; i < numberOfChildren; i++) {
                tn.Children[i] = TypeNode.Read(reader);
            }

            return tn;
        }