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)); }
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(); }
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)); }