using System.Collections.Generic;
namespace SabreTools.Models.PortableExecutable
{
///
/// All image files that import symbols, including virtually all executable (EXE) files,
/// have an .idata section. A typical file layout for the import information follows:
///
/// - Directory Table
/// Null Directory Entry
/// - DLL1 Import Lookup Table
/// Null
/// - DLL2 Import Lookup Table
/// Null
/// - DLL3 Import Lookup Table
/// Null
/// - Hint-Name Table
///
///
public sealed class ImportTable
{
///
/// The import information begins with the import directory table, which describes the
/// remainder of the import information.
///
#if NET48
public ImportDirectoryTableEntry[] ImportDirectoryTable { get; set; }
#else
public ImportDirectoryTableEntry?[]? ImportDirectoryTable { get; set; }
#endif
///
/// An import lookup table is an array of 32-bit numbers for PE32 or an array of 64-bit
/// numbers for PE32+.
///
#if NET48
public Dictionary ImportLookupTables { get; set; }
#else
public Dictionary? ImportLookupTables { get; set; }
#endif
///
/// These addresses are the actual memory addresses of the symbols, although technically
/// they are still called "virtual addresses".
///
#if NET48
public Dictionary ImportAddressTables { get; set; }
#else
public Dictionary? ImportAddressTables { get; set; }
#endif
///
/// One hint/name table suffices for the entire import section.
///
#if NET48
public HintNameTableEntry[] HintNameTable { get; set; }
#else
public HintNameTableEntry?[]? HintNameTable { get; set; }
#endif
}
}