Class CilInstructionFormatter
- Namespace
- AsmResolver.PE.DotNet.Cil
- Assembly
- AsmResolver.PE.dll
Provides the default implementation of the ICilInstructionFormatter interface.
public class CilInstructionFormatter : ICilInstructionFormatter
- Inheritance
-
CilInstructionFormatter
- Implements
- Inherited Members
Properties
Instance
Gets the default instance of the CilInstructionFormatter class.
public static CilInstructionFormatter Instance { get; }
Property Value
Methods
FormatArgument(object?)
Formats an operand as an InlineArgument or ShortInlineArgument.
protected virtual string FormatArgument(object? operand)
Parameters
operand
objectThe operand to format.
Returns
- string
The formatted string.
FormatBranchTarget(object?)
Formats a branch target operand.
protected virtual string FormatBranchTarget(object? operand)
Parameters
operand
objectThe operand to format.
Returns
- string
The formatted string.
FormatFloat(object?)
Formats an integer operand.
protected virtual string FormatFloat(object? operand)
Parameters
operand
objectThe operand to format.
Returns
- string
The formatted string.
FormatInstruction(CilInstruction)
Formats a single instruction to a string.
public string FormatInstruction(CilInstruction instruction)
Parameters
instruction
CilInstructionThe instruction to format.
Returns
- string
The string representing the instruction.
FormatInteger(object?)
Formats an integer operand.
protected virtual string FormatInteger(object? operand)
Parameters
operand
objectThe operand to format.
Returns
- string
The formatted string.
FormatLabel(int)
Formats a CIL offset as a label.
public virtual string FormatLabel(int offset)
Parameters
offset
intThe offset.
Returns
- string
The formatted string.
FormatMember(object?)
Formats a reference to a member.
protected virtual string FormatMember(object? operand)
Parameters
operand
objectThe operand to format.
Returns
- string
The formatted string.
FormatOpCode(CilOpCode)
Formats an operation code.
public virtual string FormatOpCode(CilOpCode opcode)
Parameters
opcode
CilOpCodeThe operation code to format.
Returns
- string
The formatted string.
FormatOperand(CilOperandType, object?)
Formats an operand to a human readable string.
public virtual string FormatOperand(CilOperandType operandType, object? operand)
Parameters
operandType
CilOperandTypeThe type of operand to format.
operand
objectThe operand to format.
Returns
- string
The formatted string.
Exceptions
- ArgumentOutOfRangeException
Occurs when the provided operand type is not valid.
FormatSignature(object?)
Formats a reference to a stand-alone signature.
protected virtual string FormatSignature(object? operand)
Parameters
operand
objectThe operand to format.
Returns
- string
The formatted string.
FormatString(object?)
Formats a string operand.
protected virtual string FormatString(object? operand)
Parameters
operand
objectThe operand to format.
Returns
- string
The formatted string.
FormatSwitch(object?)
Formats a switch table operand.
protected virtual string FormatSwitch(object? operand)
Parameters
operand
objectThe operand to format.
Returns
- string
The formatted string.
FormatToken(MetadataToken)
Formats a raw metadata token.
protected virtual string FormatToken(MetadataToken token)
Parameters
token
MetadataTokenThe token to format.
Returns
- string
The formatted string.
FormatVariable(object?)
Formats an operand as an InlineVar or ShortInlineVar.
protected virtual string FormatVariable(object? operand)
Parameters
operand
objectThe operand to format.
Returns
- string
The formatted string.