-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathImageDataDirectory.cs
More file actions
30 lines (27 loc) · 1000 Bytes
/
ImageDataDirectory.cs
File metadata and controls
30 lines (27 loc) · 1000 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
using System.Diagnostics;
namespace BytecodeApi.PEParser;
/// <summary>
/// Represents a data directory of a PE image file.
/// </summary>
[DebuggerDisplay($"{nameof(ImageDataDirectory)}: Name = {{Name}}, VirtualAddress = {{VirtualAddress}}, Size = {{Size}}")]
public sealed class ImageDataDirectory
{
/// <summary>
/// Gets the name of the data directory. This may not be a valid enum value of <see cref="ImageDataDirectoryName" />, if the image has more than 14 data directories.
/// </summary>
public ImageDataDirectoryName Name { get; }
/// <summary>
/// Gets the address of the first byte of a table or string that Windows uses.
/// </summary>
public uint VirtualAddress { get; }
/// <summary>
/// Gets size of a table or string that Windows uses.
/// </summary>
public uint Size { get; }
internal ImageDataDirectory(ImageDataDirectoryName name, uint virtualAddress, uint size)
{
Name = name;
VirtualAddress = virtualAddress;
Size = size;
}
}