Class SerializedDotNetResourcesDirectory
- Namespace
- AsmResolver.PE.DotNet.Resources
- Assembly
- AsmResolver.PE.dll
Provides an implementation of a .NET resources directory that obtains blobs from a readable segment in a file.
public class SerializedDotNetResourcesDirectory : DotNetResourcesDirectory, ISegment, IOffsetProvider, IWritable- Inheritance
- 
      
      
      
      SerializedDotNetResourcesDirectory
- Implements
- Inherited Members
Constructors
SerializedDotNetResourcesDirectory(in BinaryStreamReader)
Creates a new instance of the SerializedDotNetResourcesDirectory using an input stream as raw contents of the directory.
public SerializedDotNetResourcesDirectory(in BinaryStreamReader reader)Parameters
- readerBinaryStreamReader
- The input stream. 
SerializedDotNetResourcesDirectory(IReadableSegment)
Creates a new instance of the SerializedDotNetResourcesDirectory using a readable data segment as raw contents of the directory.
public SerializedDotNetResourcesDirectory(IReadableSegment contents)Parameters
- contentsIReadableSegment
- The input stream. 
Methods
GetManifestResourceData(uint)
Gets the manifest resource data by its offset.
public override byte[]? GetManifestResourceData(uint offset)Parameters
- offsetuint
- The offset of the resource data, relative to the start of the data directory. 
Returns
- byte[]
- The data, or - nullif the offset is not a valid offset.
GetPhysicalSize()
Computes the number of bytes that the structure contains.
public override uint GetPhysicalSize()Returns
- uint
- The number of bytes. 
TryCreateManifestResourceReader(uint, out BinaryStreamReader)
Gets a reader starting at the beginning of the resource data referenced by the provided offset.
public override bool TryCreateManifestResourceReader(uint offset, out BinaryStreamReader reader)Parameters
- offsetuint
- The offset of the resource data, relative to the start of the data directory. 
- readerBinaryStreamReader
- When this method returns - true, this parameter contains the created binary reader.
Returns
- bool
- trueif a blob reader could be created at the provided offset,- falseotherwise.
Write(BinaryStreamWriter)
Serializes the structure to an output stream.
public override void Write(BinaryStreamWriter writer)Parameters
- writerBinaryStreamWriter
- The output stream to write the data to.