Table of Contents

Class DefaultMethodBodyReader

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

Provides a default implementation of a IMethodBodyReader, which reads CIL method bodies using the CilRawMethodBody class.

public class DefaultMethodBodyReader : IMethodBodyReader
Inheritance
DefaultMethodBodyReader
Implements
Inherited Members

Properties

Instance

Gets the singleton instance of the DefaultMethodBodyReader class.

public static DefaultMethodBodyReader Instance { get; }

Property Value

DefaultMethodBodyReader

Methods

ReadMethodBody(ModuleReaderContext, MethodDefinition, in MethodDefinitionRow)

Reads a method body

public virtual MethodBody? ReadMethodBody(ModuleReaderContext context, MethodDefinition owner, in MethodDefinitionRow row)

Parameters

context ModuleReaderContext

The reader context.

owner MethodDefinition

The owner of the method body.

row MethodDefinitionRow

The metadata row of the owner method.

Returns

MethodBody

The method, or null if none was provided.

Remarks

Implementations should never access MethodBody or CilMethodBody, as this might result in an infinite recursive loop.