Table of Contents

Class ModuleReaderContext

Namespace
AsmResolver.DotNet.Serialized
Assembly
AsmResolver.DotNet.dll

Provides a context in which a .NET module parser exists in. This includes the original PE image, as well as the module reader parameters.

public class ModuleReaderContext : IErrorListener
Inheritance
ModuleReaderContext
Implements
Inherited Members

Constructors

ModuleReaderContext(PEImage, SerializedModuleDefinition, ModuleReaderParameters)

Creates a new instance of the ModuleReaderContext class.

public ModuleReaderContext(PEImage image, SerializedModuleDefinition parentModule, ModuleReaderParameters parameters)

Parameters

image PEImage

The original PE image to read from.

parentModule SerializedModuleDefinition

The root module object.

parameters ModuleReaderParameters

The module reader parameters.

Properties

BlobStream

Gets the main blob stream in the metadata directory.

public BlobStream? BlobStream { get; }

Property Value

BlobStream

BlobStreamIndex

Gets the original index of the blob stream.

public int BlobStreamIndex { get; }

Property Value

int

GuidStream

Gets the main GUID stream in the metadata directory.

public GuidStream? GuidStream { get; }

Property Value

GuidStream

GuidStreamIndex

Gets the original index of the GUID stream.

public int GuidStreamIndex { get; }

Property Value

int

Image

Gets the original PE image to read from.

public PEImage Image { get; }

Property Value

PEImage

Metadata

Gets the original metadata directory.

public MetadataDirectory Metadata { get; }

Property Value

MetadataDirectory

Parameters

Gets the reader parameters.

public ModuleReaderParameters Parameters { get; }

Property Value

ModuleReaderParameters

ParentModule

Gets the root module object that is being read.

public SerializedModuleDefinition ParentModule { get; }

Property Value

SerializedModuleDefinition

StringsStream

Gets the main strings stream in the metadata directory.

public StringsStream? StringsStream { get; }

Property Value

StringsStream

StringsStreamIndex

Gets the original index of the strings stream.

public int StringsStreamIndex { get; }

Property Value

int

TablesStream

Gets the main tables stream in the metadata directory.

public TablesStream TablesStream { get; }

Property Value

TablesStream

TablesStreamIndex

Gets the original index of the tables stream.

public int TablesStreamIndex { get; }

Property Value

int

UserStringsStream

Gets the main user-strings stream in the metadata directory.

public UserStringsStream? UserStringsStream { get; }

Property Value

UserStringsStream

UserStringsStreamIndex

Gets the original index of the user-strings stream.

public int UserStringsStreamIndex { get; }

Property Value

int

Methods

MarkAsFatal()

Marks the process to have failed.

public void MarkAsFatal()

RegisterException(Exception)

Registers an error.

public void RegisterException(Exception exception)

Parameters

exception Exception

The error.