Class CustomReadyToRunSection
- Namespace
- AsmResolver.PE.DotNet.ReadyToRun
- Assembly
- AsmResolver.PE.dll
Represents a ReadyToRun section with a custom or unsupported file format.
public sealed class CustomReadyToRunSection : SegmentBase, IReadyToRunSection, ISegment, IOffsetProvider, IWritable
- Inheritance
-
CustomReadyToRunSection
- Implements
- Inherited Members
Constructors
CustomReadyToRunSection(ReadyToRunSectionType, ISegment)
Creates a new ReadyToRun section with a custom format.
public CustomReadyToRunSection(ReadyToRunSectionType type, ISegment contents)
Parameters
type
ReadyToRunSectionTypeThe type of the section.
contents
ISegmentThe contents of the section.
Properties
CanRead
Indicates whether the raw contents of the section can be read using a BinaryStreamReader.
public bool CanRead { get; }
Property Value
Contents
Gets or sets the contents of the section.
public ISegment Contents { get; }
Property Value
Type
Gets the type of the ReadyToRun section.
public ReadyToRunSectionType Type { get; }
Property Value
Methods
CreateReader()
Creates a binary reader that reads the raw contents of the ReadyToRun section.
public BinaryStreamReader CreateReader()
Returns
- BinaryStreamReader
The reader.
Exceptions
- InvalidOperationException
Occurs when CanRead is
false
.
GetPhysicalSize()
Computes the number of bytes that the structure contains.
public override uint GetPhysicalSize()
Returns
- uint
The number of bytes.
Write(BinaryStreamWriter)
Serializes the structure to an output stream.
public override void Write(BinaryStreamWriter writer)
Parameters
writer
BinaryStreamWriterThe output stream to write the data to.