Table of Contents

Class ILReader

Namespace
ICSharpCode.Decompiler.IL
Assembly
ICSharpCode.Decompiler.dll

Reads IL bytecodes and converts them into ILAst instructions.

public class ILReader
Inheritance
ILReader
Inherited Members

Remarks

Instances of this class are not thread-safe. Use separate instances to decompile multiple members in parallel.

Constructors

ILReader(MetadataModule)

Creates a new ILReader instance.

public ILReader(MetadataModule module)

Parameters

module MetadataModule

The module used to resolve metadata tokens in the type system.

Properties

DebugInfo

public IDebugInfoProvider? DebugInfo { get; set; }

Property Value

IDebugInfoProvider

SequencePointCandidates

public List<int> SequencePointCandidates { get; }

Property Value

List<int>

UseDebugSymbols

public bool UseDebugSymbols { get; set; }

Property Value

bool

Warnings

public List<string> Warnings { get; }

Property Value

List<string>

Methods

ReadIL(MethodDefinitionHandle, MethodBodyBlock, GenericContext, ILFunctionKind, CancellationToken)

Decodes the specified method body and returns an ILFunction.

public ILFunction ReadIL(MethodDefinitionHandle method, MethodBodyBlock body, GenericContext genericContext = default, ILFunctionKind kind = ILFunctionKind.TopLevelFunction, CancellationToken cancellationToken = default)

Parameters

method MethodDefinitionHandle
body MethodBodyBlock
genericContext GenericContext
kind ILFunctionKind
cancellationToken CancellationToken

Returns

ILFunction

WriteTypedIL(MethodDefinitionHandle, MethodBodyBlock, ITextOutput, GenericContext, CancellationToken)

Debugging helper: writes the decoded instruction stream interleaved with the inferred evaluation stack layout.

public void WriteTypedIL(MethodDefinitionHandle method, MethodBodyBlock body, ITextOutput output, GenericContext genericContext = default, CancellationToken cancellationToken = default)

Parameters

method MethodDefinitionHandle
body MethodBodyBlock
output ITextOutput
genericContext GenericContext
cancellationToken CancellationToken