Table of Contents

Class CilRawMethodBody

Namespace
AsmResolver.PE.DotNet.Cil
Assembly
AsmResolver.PE.dll

When overridden from this class, represents a chunk of CIL code that implements a method body.

public abstract class CilRawMethodBody : SegmentBase, ISegment, IOffsetProvider, IWritable
Inheritance
CilRawMethodBody
Implements
Derived
Inherited Members

Constructors

CilRawMethodBody(IReadableSegment)

protected CilRawMethodBody(IReadableSegment code)

Parameters

code IReadableSegment

Properties

Code

Gets or sets the raw bytes that make up the CIL code of the method body.

public IReadableSegment Code { get; set; }

Property Value

IReadableSegment

IsFat

Gets a value indicating whether the method body is using the fat format.

public abstract bool IsFat { get; }

Property Value

bool

Methods

FromReader(IErrorListener, ref BinaryStreamReader)

Reads a raw method body from the given binary input stream.

public static CilRawMethodBody? FromReader(IErrorListener errorListener, ref BinaryStreamReader reader)

Parameters

errorListener IErrorListener

The object responsible for recording parser errors.

reader BinaryStreamReader

The binary input stream to read from.

Returns

CilRawMethodBody

The raw method body.

Exceptions

NotSupportedException

Occurs when the method header indicates an invalid or unsupported method body format.

FromReader(ref BinaryStreamReader)

Reads a raw method body from the given binary input stream.

public static CilRawMethodBody? FromReader(ref BinaryStreamReader reader)

Parameters

reader BinaryStreamReader

The binary input stream to read from.

Returns

CilRawMethodBody

The raw method body.

Exceptions

NotSupportedException

Occurs when the method header indicates an invalid or unsupported method body format.