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
contextModuleReaderContextThe reader context.
ownerMethodDefinitionThe owner of the method body.
rowMethodDefinitionRowThe metadata row of the owner method.
Returns
- MethodBody
The method, or
nullif none was provided.
Remarks
Implementations should never access MethodBody or CilMethodBody, as this might result in an infinite recursive loop.