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
MetadataModuleThe module used to resolve metadata tokens in the type system.
Properties
DebugInfo
public IDebugInfoProvider? DebugInfo { get; set; }
Property Value
SequencePointCandidates
public List<int> SequencePointCandidates { get; }
Property Value
UseDebugSymbols
public bool UseDebugSymbols { get; set; }
Property Value
Warnings
public List<string> Warnings { get; }
Property Value
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
MethodDefinitionHandlebody
MethodBodyBlockgenericContext
GenericContextkind
ILFunctionKindcancellationToken
CancellationToken
Returns
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
MethodDefinitionHandlebody
MethodBodyBlockoutput
ITextOutputgenericContext
GenericContextcancellationToken
CancellationToken