// dnlib: See LICENSE.txt for more info using System; using System.Diagnostics; using dnlib.IO; namespace dnlib.PE { /// /// Represents the IMAGE_DATA_DIRECTORY PE section /// [DebuggerDisplay("{virtualAddress} {dataSize}")] public sealed class ImageDataDirectory : FileSection { readonly RVA virtualAddress; readonly uint dataSize; /// /// Returns the IMAGE_DATA_DIRECTORY.VirtualAddress field /// public RVA VirtualAddress => virtualAddress; /// /// Returns the IMAGE_DATA_DIRECTORY.Size field /// public uint Size => dataSize; /// /// Default constructor /// public ImageDataDirectory() { } /// /// Constructor /// /// PE file reader pointing to the start of this section /// Verify section /// Thrown if verification fails public ImageDataDirectory(ref DataReader reader, bool verify) { SetStartOffset(ref reader); virtualAddress = (RVA)reader.ReadUInt32(); dataSize = reader.ReadUInt32(); SetEndoffset(ref reader); } } }