示例#1
0
 public TableHeap(MetadataHeaps heaps, byte[] buffer) : base(buffer, 0x08)
 {
     MoveTo(START_POSITION);
     _heaps        = heaps;
     _tables       = GetMetadataTables();
     _isLargeToken = Func.Memoize <CodedTokenType, bool>(type => CodedTokenSchema.IsLargeToken(type, this));
 }
示例#2
0
        private void ReadMetadataStreams()
        {
            SectionHeader header;

            if (!TryGetSectionAtVirtualAddress(_clrHeader.Metadata.RVA, out header))
            {
                throw new BadImageFormatException();
            }

            _heaps = new MetadataHeaps();
            for (int i = 0; i < _metadataHeader.NumberOfStreams; i++)
            {
                ReadMetadataStream(header);
            }

            _heaps.Tables.Read();
        }
示例#3
0
 public TableHeap(MetadataHeaps heaps) : base(Empty <byte> .Array, 0x08)
 {
     _heaps        = heaps;
     _tables       = new IMetadataTable[TABLES_COUNT];
     _isLargeToken = Func.Memoize <CodedTokenType, bool>(type => CodedTokenSchema.IsLargeToken(type, this));
 }