Skip to content

IlDisassembler

Namespace: Dotsider.Core.Analysis

Assembly: Dotsider.Core.dll

Decodes IL (Intermediate Language) method bodies into human-readable instruction sequences.

public sealed class IlDisassembler

ObjectIlDisassembler

Decodes IL (Intermediate Language) method bodies into human-readable instruction sequences.

Parameters:

public IlDisassembler(AssemblyAnalyzer analyzer)

Disassembles a method’s IL body into a sequence of instructions. Returns an empty list if the method has no IL body.

Parameters:

Returns: IReadOnlyList<IlInstruction>

The list of decoded IL instructions.

public IReadOnlyList<IlInstruction> Disassemble(MethodDefInfo method)

Disassembles a method and returns the text, instruction list, and header line count.

Parameters:

Returns: Nullable<String, IlInstruction>, Int32>>

Tuple of (text, instructions, headerLineCount), or null if no IL body.

public (string Text, IReadOnlyList<IlInstruction> Instructions, int HeaderLineCount)? DisassembleWithText(MethodDefInfo method)

Formats a complete disassembly listing for a method, including header information.

Parameters:

Returns: String

A multi-line string with the full disassembly listing.

public string FormatDisassembly(MethodDefInfo method)

Returns the number of header lines for a method’s disassembly listing.

Parameters:

  • method (MethodDefInfo): The method to compute header lines for.

Returns: Int32

The number of header lines, or 0 if no IL body.

public int GetHeaderLineCount(MethodDefInfo method)