/// <inheritdoc />
        protected override IList <ExportedSymbol> GetExports()
        {
            var result = new ExportedSymbolCollection(this);

            if (!_context.File.TryCreateReaderAtRva(_addressTableRva, out var addressReader))
            {
                _context.BadImage("Export directory contains an invalid address table RVA.");
            }

            if (!_context.File.TryCreateReaderAtRva(_namePointerRva, out var namePointerReader))
            {
                _context.BadImage("Export directory contains an invalid name pointer table RVA.");
            }

            if (!_context.File.TryCreateReaderAtRva(_ordinalTableRva, out var ordinalReader))
            {
                _context.BadImage("Export directory contains an invalid ordinal table RVA.");
            }

            if (addressReader is null || namePointerReader is null || ordinalReader is null)
            {
                return(result);
            }

            var ordinalNameTable = ReadOrdinalNameTable(namePointerReader, ordinalReader);

            for (uint i = 0; i < _numberOfFunctions; i++)
            {
                uint rva = addressReader.ReadUInt32();
                ordinalNameTable.TryGetValue(i, out string name);
                result.Add(new ExportedSymbol(_context.File.GetReferenceToRva(rva), name));
            }

            return(result);
        }
        /// <inheritdoc />
        protected override IList <ExportedSymbol> GetExports()
        {
            var result = new ExportedSymbolCollection(this);

            if (!_peFile.TryCreateReaderAtRva(_addressTableRva, out var addressReader) ||
                !_peFile.TryCreateReaderAtRva(_namePointerRva, out var namePointerReader) ||
                !_peFile.TryCreateReaderAtRva(_ordinalTableRva, out var ordinalReader))
            {
                return(result);
            }

            var ordinalNameTable = ReadOrdinalNameTable(namePointerReader, ordinalReader);

            for (uint i = 0; i < _numberOfFunctions; i++)
            {
                uint rva = addressReader.ReadUInt32();
                ordinalNameTable.TryGetValue(i, out string name);
                result.Add(new ExportedSymbol(_peFile.GetReferenceToRva(rva), name));
            }

            return(result);
        }