Table of Contents

Method Emit

Namespace
MonoMod.Cil
Assembly
MonoMod.Utils.dll

Emit(OpCode, ParameterDefinition)

Emit a new instruction at this cursor's current position.
public ILCursor Emit(OpCode opcode, ParameterDefinition parameter)

Parameters

opcode OpCode
The instruction opcode.
parameter ParameterDefinition
The instruction operand.

Returns

ILCursor
this

Emit(OpCode, VariableDefinition)

Emit a new instruction at this cursor's current position.
public ILCursor Emit(OpCode opcode, VariableDefinition variable)

Parameters

opcode OpCode
The instruction opcode.
variable VariableDefinition
The instruction operand.

Returns

ILCursor
this

Emit(OpCode, Instruction[])

Emit a new instruction at this cursor's current position.
public ILCursor Emit(OpCode opcode, Instruction[] targets)

Parameters

opcode OpCode
The instruction opcode.
targets Instruction[]
The instruction operand.

Returns

ILCursor
this

Emit(OpCode, Instruction)

Emit a new instruction at this cursor's current position.
public ILCursor Emit(OpCode opcode, Instruction target)

Parameters

opcode OpCode
The instruction opcode.
target Instruction
The instruction operand.

Returns

ILCursor
this

Emit(OpCode, double)

Emit a new instruction at this cursor's current position.
public ILCursor Emit(OpCode opcode, double value)

Parameters

opcode OpCode
The instruction opcode.
value double
The instruction operand.

Returns

ILCursor
this

Emit(OpCode, float)

Emit a new instruction at this cursor's current position.
public ILCursor Emit(OpCode opcode, float value)

Parameters

opcode OpCode
The instruction opcode.
value float
The instruction operand.

Returns

ILCursor
this

Emit(OpCode, long)

Emit a new instruction at this cursor's current position.
public ILCursor Emit(OpCode opcode, long value)

Parameters

opcode OpCode
The instruction opcode.
value long
The instruction operand.

Returns

ILCursor
this

Emit(OpCode, sbyte)

Emit a new instruction at this cursor's current position.
public ILCursor Emit(OpCode opcode, sbyte value)

Parameters

opcode OpCode
The instruction opcode.
value sbyte
The instruction operand.

Returns

ILCursor
this

Emit(OpCode, byte)

Emit a new instruction at this cursor's current position.
public ILCursor Emit(OpCode opcode, byte value)

Parameters

opcode OpCode
The instruction opcode.
value byte
The instruction operand.

Returns

ILCursor
this

Emit(OpCode, string)

Emit a new instruction at this cursor's current position.
public ILCursor Emit(OpCode opcode, string value)

Parameters

opcode OpCode
The instruction opcode.
value string
The instruction operand.

Returns

ILCursor
this

Emit(OpCode, FieldReference)

Emit a new instruction at this cursor's current position.
public ILCursor Emit(OpCode opcode, FieldReference field)

Parameters

opcode OpCode
The instruction opcode.
field FieldReference
The instruction operand.

Returns

ILCursor
this

Emit(OpCode, CallSite)

Emit a new instruction at this cursor's current position.
public ILCursor Emit(OpCode opcode, CallSite site)

Parameters

opcode OpCode
The instruction opcode.
site CallSite
The instruction operand.

Returns

ILCursor
this

Emit(OpCode, TypeReference)

Emit a new instruction at this cursor's current position.
public ILCursor Emit(OpCode opcode, TypeReference type)

Parameters

opcode OpCode
The instruction opcode.
type TypeReference
The instruction operand.

Returns

ILCursor
this

Emit(OpCode)

Emit a new instruction at this cursor's current position.
public ILCursor Emit(OpCode opcode)

Parameters

opcode OpCode
The instruction opcode.

Returns

ILCursor
this

Emit(OpCode, int)

Emit a new instruction at this cursor's current position.
public ILCursor Emit(OpCode opcode, int value)

Parameters

opcode OpCode
The instruction opcode.
value int
The instruction operand.

Returns

ILCursor
this

Emit(OpCode, MethodReference)

Emit a new instruction at this cursor's current position.
public ILCursor Emit(OpCode opcode, MethodReference method)

Parameters

opcode OpCode
The instruction opcode.
method MethodReference
The instruction operand.

Returns

ILCursor
this

Emit(OpCode, FieldInfo)

Emit a new instruction at this cursor's current position.
public ILCursor Emit(OpCode opcode, FieldInfo field)

Parameters

opcode OpCode
The instruction opcode.
field FieldInfo
The instruction operand.

Returns

ILCursor
this

Emit(OpCode, MethodBase)

Emit a new instruction at this cursor's current position.
public ILCursor Emit(OpCode opcode, MethodBase method)

Parameters

opcode OpCode
The instruction opcode.
method MethodBase
The instruction operand.

Returns

ILCursor
this

Emit(OpCode, Type)

Emit a new instruction at this cursor's current position.
public ILCursor Emit(OpCode opcode, Type type)

Parameters

opcode OpCode
The instruction opcode.
type Type
The instruction operand.

Returns

ILCursor
this

Emit(OpCode, object)

Emit a new instruction at this cursor's current position.
public ILCursor Emit(OpCode opcode, object operand)

Parameters

opcode OpCode
The instruction opcode.
operand object
The instruction operand.

Returns

ILCursor
this

Emit<T>(OpCode, string)

Emit a new instruction at this cursor's current position, accessing a given member.
public ILCursor Emit<T>(OpCode opcode, string memberName)

Parameters

opcode OpCode
The instruction opcode.
memberName string
The accessed member name.

Returns

ILCursor
this

Type Parameters

T
The type in which the member is defined.