Class SerializedResourceDirectory
- Namespace
- AsmResolver.PE.Win32Resources
- Assembly
- AsmResolver.PE.dll
Provides an implementation of a resource directory that was read from an existing PE file.
public class SerializedResourceDirectory : ResourceDirectory, IResourceEntry, IOwnedCollectionElement<ResourceDirectory>
- Inheritance
-
SerializedResourceDirectory
- Implements
- Inherited Members
Constructors
SerializedResourceDirectory(PEReaderContext, ResourceDirectoryEntry?, ref BinaryStreamReader, int)
Reads a single resource directory from an input stream.
public SerializedResourceDirectory(PEReaderContext context, ResourceDirectoryEntry? entry, ref BinaryStreamReader directoryReader, int depth = 0)
Parameters
context
PEReaderContextThe reader context.
entry
ResourceDirectoryEntry?The entry to read. If this value is
null
, the root directory is assumed.directoryReader
BinaryStreamReaderThe input stream.
depth
intThe current depth of the resource directory tree structure. If this value exceeds MaxDepth, this class will not initialize any entries.
Fields
MaxDepth
Indicates the maximum depth of sub directories a resource directory can have before AsmResolver aborts reading the resource tree branch.
public const int MaxDepth = 10
Field Value
ResourceDirectorySize
Indicates the size of a single sub-directory entry in a resource directory.
public const uint ResourceDirectorySize = 16
Field Value
Methods
GetEntries()
Obtains the list of entries in the directory.
protected override IList<IResourceEntry> GetEntries()
Returns
- IList<IResourceEntry>
The list of entries.
Remarks
This method is called upon initialization of the Entries property.