Ejemplo n.º 1
0
        private object ProcessOffsetNode(IBinaryReader binaryReader, IOffsetNode node)
        {
            uint offset = node.ReadOffset(binaryReader);

            object result = null;

            binaryReader.DoAtPosition(offset, () => result = ProcessDataNode(binaryReader, node.ChildNode));

            return(result);
        }
Ejemplo n.º 2
0
        private object ProcessListNode(IBinaryReader binaryReader, IListNode listNode)
        {
            int    count  = listNode.ReadEntryCount(binaryReader);
            uint   offset = listNode.ReadOffset(binaryReader);
            object list   = listNode.CreateList();

            if (count != 0)
            {
                binaryReader.DoAtPosition(offset, () =>
                {
                    for (int n = 0; n < count; ++n)
                    {
                        object entry = ProcessDataNode(binaryReader, listNode.ChildNode);
                        listNode.AddListEntry(list, entry);
                    }
                });
            }

            return(list);
        }