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
Methods
ReadMethodBody(ModuleReaderContext, MethodDefinition, in MethodDefinitionRow)
Reads a method body
public virtual MethodBody? ReadMethodBody(ModuleReaderContext context, MethodDefinition owner, in MethodDefinitionRow row)
Parameters
context
ModuleReaderContextThe reader context.
owner
MethodDefinitionThe owner of the method body.
row
MethodDefinitionRowThe 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.