Exemplo n.º 1
0
        private void ReadVariableTable(BinaryReader reader)
        {
            reader.BaseStream.Seek(VariableTableOffset, SeekOrigin.Begin);
            int entryCount = reader.ReadInt32();

            VariableTableEntry[] entires = new VariableTableEntry[entryCount];
            for (int i = 0; i < entryCount; i++)
            {
                entires[i] = new VariableTableEntry
                {
                    Offset = reader.ReadInt32(),
                    Size   = reader.ReadInt32()
                };

                //Debug.WriteLine(entires[i]);
            }

            // Order all variables by their offset to calculate their actual size.
            VariableTableEntries = entires.OrderBy(e => e.Offset).ToArray();
        }
Exemplo n.º 2
0
        private void ReadVariableTable(BinaryReader reader)
        {
            reader.BaseStream.Seek(VariableTableOffset, SeekOrigin.Begin);
            int entryCount = reader.ReadInt32();
            VariableTableEntry[] entires = new VariableTableEntry[entryCount];
            for (int i = 0; i < entryCount; i++)
            {
                entires[i] = new VariableTableEntry
                {
                    Offset = reader.ReadInt32(),
                    Size = reader.ReadInt32()
                };

                //Debug.WriteLine(entires[i]);

            }

            // Order all variables by their offset to calculate their actual size.
            VariableTableEntries = entires.OrderBy(e => e.Offset).ToArray();
        }