public object Read(NodeEntry node, BinaryReader reader, List <INodeParser> parsers) { node.Parser = this; var result = new FactsTable(); reader.Skip(4); //skip Id var count = reader.ReadPackedInt(); var tmpFactList = new uint[count]; for (int i = 0; i < count; i++) { tmpFactList[i] = reader.ReadUInt32(); } for (int i = 0; i < count; i++) { result.FactEntries.Add(new FactsTable.FactEntry { Hash = tmpFactList[i], Value = reader.ReadUInt32() }); } ParserUtils.ParseChildren(node.Children, reader, parsers); result.Node = node; return(result); }
public object Read(NodeEntry node, BinaryReader reader, List <INodeParser> parsers) { var result = new FactsTable(); reader.Skip(4); //skip Id var count = ParserUtils.ReadPackedLong(reader); var tmpFactList = new uint[count]; for (int i = 0; i < count; i++) { tmpFactList[i] = reader.ReadUInt32(); } result.FactEntries = new FactsTable.FactEntry[count]; for (int i = 0; i < count; i++) { result.FactEntries[i] = new FactsTable.FactEntry() { Hash = tmpFactList[i], Value = reader.ReadUInt32() }; } ParserUtils.ParseChildren(node.Children, reader, parsers); return(result); }