Class ILCursor
A cursor used to manipulate a method body in an ILContext.
public sealed class ILCursor
- Inheritance
-
ILCursor
- Extension Methods
Constructors
Properties
- Context
- The context to which this cursor belongs to.
- IncomingLabels
- Enumerates all labels which point to the current instruction (
label.Target == Next
)
- Index
- The index of the instruction immediately following the cursor position. Range: 0 to
Instrs.Count
Setter accepts negative indexing by addingInstrs.Count
to the operand
- Next
- The instruction immediately following the cursor position or null if the cursor is at the end of the instruction list.
- Prev
- The instruction immediately preceding the cursor position or null if the cursor is at the start of the instruction list.
- Previous
- The instruction immediately preceding the cursor position or null if the cursor is at the start of the instruction list.
- SearchTarget
- Indicates whether the position of a MMILCursor is the result of a search function and if the next search should ignore the instruction preceeding or following this cursor. See SearchTarget
Methods
- AddReference<T>(in T)
- Bind an arbitary object to an ILContext for static retrieval. See AddReference<T>(in T?)
- Clone()
- Create a clone of this cursor.
- DefineLabel()
- Create a new label for use with MarkLabel(ILLabel?)
- Emit(OpCode)
- Emit a new instruction at this cursor's current position.
- Emit(OpCode, CallSite)
- Emit a new instruction at this cursor's current position.
- Emit(OpCode, Instruction)
- Emit a new instruction at this cursor's current position.
- Emit(OpCode, Instruction[])
- Emit a new instruction at this cursor's current position.
- Emit(OpCode, VariableDefinition)
- Emit a new instruction at this cursor's current position.
- Emit(OpCode, FieldReference)
- Emit a new instruction at this cursor's current position.
- Emit(OpCode, MethodReference)
- Emit a new instruction at this cursor's current position.
- Emit(OpCode, ParameterDefinition)
- Emit a new instruction at this cursor's current position.
- Emit(OpCode, TypeReference)
- Emit a new instruction at this cursor's current position.
- Emit(OpCode, byte)
- Emit a new instruction at this cursor's current position.
- Emit(OpCode, double)
- Emit a new instruction at this cursor's current position.
- Emit(OpCode, int)
- Emit a new instruction at this cursor's current position.
- Emit(OpCode, long)
- Emit a new instruction at this cursor's current position.
- Emit(OpCode, object)
- Emit a new instruction at this cursor's current position.
- Emit(OpCode, FieldInfo)
- Emit a new instruction at this cursor's current position.
- Emit(OpCode, MethodBase)
- Emit a new instruction at this cursor's current position.
- Emit(OpCode, sbyte)
- Emit a new instruction at this cursor's current position.
- Emit(OpCode, float)
- Emit a new instruction at this cursor's current position.
- Emit(OpCode, string)
- Emit a new instruction at this cursor's current position.
- Emit(OpCode, Type)
- Emit a new instruction at this cursor's current position.
- EmitAddOvf()
- Emits a Add_Ovf opcode to the current cursor position.
- EmitAddOvfUn()
- Emits a Add_Ovf_Un opcode to the current cursor position.
- EmitArglist()
- Emits a Arglist opcode to the current cursor position.
- EmitBeq(Instruction)
- Emits a Beq or Beq_S opcode with a Instruction operand to the current cursor position.
- EmitBeq(ILLabel)
- Emits a Beq or Beq_S opcode with a ILLabel operand to the current cursor position.
- EmitBge(Instruction)
- Emits a Bge or Bge_S opcode with a Instruction operand to the current cursor position.
- EmitBge(ILLabel)
- Emits a Bge or Bge_S opcode with a ILLabel operand to the current cursor position.
- EmitBgeUn(Instruction)
- Emits a Bge_Un or Bge_Un_S opcode with a Instruction operand to the current cursor position.
- EmitBgeUn(ILLabel)
- Emits a Bge_Un or Bge_Un_S opcode with a ILLabel operand to the current cursor position.
- EmitBgt(Instruction)
- Emits a Bgt or Bgt_S opcode with a Instruction operand to the current cursor position.
- EmitBgt(ILLabel)
- Emits a Bgt or Bgt_S opcode with a ILLabel operand to the current cursor position.
- EmitBgtUn(Instruction)
- Emits a Bgt_Un or Bgt_Un_S opcode with a Instruction operand to the current cursor position.
- EmitBgtUn(ILLabel)
- Emits a Bgt_Un or Bgt_Un_S opcode with a ILLabel operand to the current cursor position.
- EmitBle(Instruction)
- Emits a Ble or Ble_S opcode with a Instruction operand to the current cursor position.
- EmitBle(ILLabel)
- Emits a Ble or Ble_S opcode with a ILLabel operand to the current cursor position.
- EmitBleUn(Instruction)
- Emits a Ble_Un or Ble_Un_S opcode with a Instruction operand to the current cursor position.
- EmitBleUn(ILLabel)
- Emits a Ble_Un or Ble_Un_S opcode with a ILLabel operand to the current cursor position.
- EmitBlt(Instruction)
- Emits a Blt or Blt_S opcode with a Instruction operand to the current cursor position.
- EmitBlt(ILLabel)
- Emits a Blt or Blt_S opcode with a ILLabel operand to the current cursor position.
- EmitBltUn(Instruction)
- Emits a Blt_Un or Blt_Un_S opcode with a Instruction operand to the current cursor position.
- EmitBltUn(ILLabel)
- Emits a Blt_Un or Blt_Un_S opcode with a ILLabel operand to the current cursor position.
- EmitBneUn(Instruction)
- Emits a Bne_Un or Bne_Un_S opcode with a Instruction operand to the current cursor position.
- EmitBneUn(ILLabel)
- Emits a Bne_Un or Bne_Un_S opcode with a ILLabel operand to the current cursor position.
- EmitBox(TypeReference)
- Emits a Box opcode with a TypeReference operand to the current cursor position.
- EmitBox(Type)
- Emits a Box opcode with a Type operand to the current cursor position.
- EmitBr(Instruction)
- Emits a Br or Br_S opcode with a Instruction operand to the current cursor position.
- EmitBr(ILLabel)
- Emits a Br or Br_S opcode with a ILLabel operand to the current cursor position.
- EmitBreak()
- Emits a Break opcode to the current cursor position.
- EmitBrfalse(Instruction)
- Emits a Brfalse or Brfalse_S opcode with a Instruction operand to the current cursor position.
- EmitBrfalse(ILLabel)
- Emits a Brfalse or Brfalse_S opcode with a ILLabel operand to the current cursor position.
- EmitBrtrue(Instruction)
- Emits a Brtrue or Brtrue_S opcode with a Instruction operand to the current cursor position.
- EmitBrtrue(ILLabel)
- Emits a Brtrue or Brtrue_S opcode with a ILLabel operand to the current cursor position.
- EmitCall(MethodReference)
- Emits a Call opcode with a MethodReference operand to the current cursor position.
- EmitCall(MethodBase)
- Emits a Call opcode with a MethodBase operand to the current cursor position.
- EmitCalli(IMethodSignature)
- Emits a Calli opcode with a IMethodSignature operand to the current cursor position.
- EmitCallvirt(MethodReference)
- Emits a Callvirt opcode with a MethodReference operand to the current cursor position.
- EmitCallvirt(MethodBase)
- Emits a Callvirt opcode with a MethodBase operand to the current cursor position.
- EmitCastclass(TypeReference)
- Emits a Castclass opcode with a TypeReference operand to the current cursor position.
- EmitCastclass(Type)
- Emits a Castclass opcode with a Type operand to the current cursor position.
- EmitCgtUn()
- Emits a Cgt_Un opcode to the current cursor position.
- EmitCkfinite()
- Emits a Ckfinite opcode to the current cursor position.
- EmitCltUn()
- Emits a Clt_Un opcode to the current cursor position.
- EmitConstrained(TypeReference)
- Emits a Constrained opcode with a TypeReference operand to the current cursor position.
- EmitConstrained(Type)
- Emits a Constrained opcode with a Type operand to the current cursor position.
- EmitConvI()
- Emits a Conv_I opcode to the current cursor position.
- EmitConvI1()
- Emits a Conv_I1 opcode to the current cursor position.
- EmitConvI2()
- Emits a Conv_I2 opcode to the current cursor position.
- EmitConvI4()
- Emits a Conv_I4 opcode to the current cursor position.
- EmitConvI8()
- Emits a Conv_I8 opcode to the current cursor position.
- EmitConvOvfI()
- Emits a Conv_Ovf_I opcode to the current cursor position.
- EmitConvOvfI1()
- Emits a Conv_Ovf_I1 opcode to the current cursor position.
- EmitConvOvfI1Un()
- Emits a Conv_Ovf_I1_Un opcode to the current cursor position.
- EmitConvOvfI2()
- Emits a Conv_Ovf_I2 opcode to the current cursor position.
- EmitConvOvfI2Un()
- Emits a Conv_Ovf_I2_Un opcode to the current cursor position.
- EmitConvOvfI4()
- Emits a Conv_Ovf_I4 opcode to the current cursor position.
- EmitConvOvfI4Un()
- Emits a Conv_Ovf_I4_Un opcode to the current cursor position.
- EmitConvOvfI8()
- Emits a Conv_Ovf_I8 opcode to the current cursor position.
- EmitConvOvfI8Un()
- Emits a Conv_Ovf_I8_Un opcode to the current cursor position.
- EmitConvOvfIUn()
- Emits a Conv_Ovf_I_Un opcode to the current cursor position.
- EmitConvOvfU()
- Emits a Conv_Ovf_U opcode to the current cursor position.
- EmitConvOvfU1()
- Emits a Conv_Ovf_U1 opcode to the current cursor position.
- EmitConvOvfU1Un()
- Emits a Conv_Ovf_U1_Un opcode to the current cursor position.
- EmitConvOvfU2()
- Emits a Conv_Ovf_U2 opcode to the current cursor position.
- EmitConvOvfU2Un()
- Emits a Conv_Ovf_U2_Un opcode to the current cursor position.
- EmitConvOvfU4()
- Emits a Conv_Ovf_U4 opcode to the current cursor position.
- EmitConvOvfU4Un()
- Emits a Conv_Ovf_U4_Un opcode to the current cursor position.
- EmitConvOvfU8()
- Emits a Conv_Ovf_U8 opcode to the current cursor position.
- EmitConvOvfU8Un()
- Emits a Conv_Ovf_U8_Un opcode to the current cursor position.
- EmitConvOvfUUn()
- Emits a Conv_Ovf_U_Un opcode to the current cursor position.
- EmitConvR4()
- Emits a Conv_R4 opcode to the current cursor position.
- EmitConvR8()
- Emits a Conv_R8 opcode to the current cursor position.
- EmitConvRUn()
- Emits a Conv_R_Un opcode to the current cursor position.
- EmitConvU()
- Emits a Conv_U opcode to the current cursor position.
- EmitConvU1()
- Emits a Conv_U1 opcode to the current cursor position.
- EmitConvU2()
- Emits a Conv_U2 opcode to the current cursor position.
- EmitConvU4()
- Emits a Conv_U4 opcode to the current cursor position.
- EmitConvU8()
- Emits a Conv_U8 opcode to the current cursor position.
- EmitCpblk()
- Emits a Cpblk opcode to the current cursor position.
- EmitCpobj(TypeReference)
- Emits a Cpobj opcode with a TypeReference operand to the current cursor position.
- EmitCpobj(Type)
- Emits a Cpobj opcode with a Type operand to the current cursor position.
- EmitDelegate<T>(T)
- Emit the IL to invoke a delegate as if it were a method. Stack behaviour matches OpCodes.Call
- EmitDivUn()
- Emits a Div_Un opcode to the current cursor position.
- EmitEndfilter()
- Emits a Endfilter opcode to the current cursor position.
- EmitEndfinally()
- Emits a Endfinally opcode to the current cursor position.
- EmitGetReference<T>(int)
- Emit the IL to retrieve a stored reference of type
T
with the givenid
and place it on the stack.
- EmitInitblk()
- Emits a Initblk opcode to the current cursor position.
- EmitInitobj(TypeReference)
- Emits a Initobj opcode with a TypeReference operand to the current cursor position.
- EmitInitobj(Type)
- Emits a Initobj opcode with a Type operand to the current cursor position.
- EmitIsinst(TypeReference)
- Emits a Isinst opcode with a TypeReference operand to the current cursor position.
- EmitIsinst(Type)
- Emits a Isinst opcode with a Type operand to the current cursor position.
- EmitJmp(MethodReference)
- Emits a Jmp opcode with a MethodReference operand to the current cursor position.
- EmitJmp(MethodBase)
- Emits a Jmp opcode with a MethodBase operand to the current cursor position.
- EmitLdarg(ParameterReference)
- Emits a Ldarg or Ldarg_S opcode with a ParameterReference operand to the current cursor position.
- EmitLdarg(int)
- Emits a Ldarg or Ldarg_S opcode with a int operand to the current cursor position.
- EmitLdarg(uint)
- Emits a Ldarg or Ldarg_S opcode with a uint operand to the current cursor position.
- EmitLdarg0()
- Emits a Ldarg_0 opcode to the current cursor position.
- EmitLdarg1()
- Emits a Ldarg_1 opcode to the current cursor position.
- EmitLdarg2()
- Emits a Ldarg_2 opcode to the current cursor position.
- EmitLdarg3()
- Emits a Ldarg_3 opcode to the current cursor position.
- EmitLdarga(ParameterReference)
- Emits a Ldarga or Ldarga_S opcode with a ParameterReference operand to the current cursor position.
- EmitLdarga(int)
- Emits a Ldarga or Ldarga_S opcode with a int operand to the current cursor position.
- EmitLdarga(uint)
- Emits a Ldarga or Ldarga_S opcode with a uint operand to the current cursor position.
- EmitLdcI4(int)
- Emits a Ldc_I4 opcode with a int operand to the current cursor position.
- EmitLdcI4(uint)
- Emits a Ldc_I4 opcode with a uint operand to the current cursor position.
- EmitLdcI8(long)
- Emits a Ldc_I8 opcode with a long operand to the current cursor position.
- EmitLdcI8(ulong)
- Emits a Ldc_I8 opcode with a ulong operand to the current cursor position.
- EmitLdcR4(float)
- Emits a Ldc_R4 opcode with a float operand to the current cursor position.
- EmitLdcR8(double)
- Emits a Ldc_R8 opcode with a double operand to the current cursor position.
- EmitLdelemAny(TypeReference)
- Emits a Ldelem_Any opcode with a TypeReference operand to the current cursor position.
- EmitLdelemAny(Type)
- Emits a Ldelem_Any opcode with a Type operand to the current cursor position.
- EmitLdelemI()
- Emits a Ldelem_I opcode to the current cursor position.
- EmitLdelemI1()
- Emits a Ldelem_I1 opcode to the current cursor position.
- EmitLdelemI2()
- Emits a Ldelem_I2 opcode to the current cursor position.
- EmitLdelemI4()
- Emits a Ldelem_I4 opcode to the current cursor position.
- EmitLdelemI8()
- Emits a Ldelem_I8 opcode to the current cursor position.
- EmitLdelemR4()
- Emits a Ldelem_R4 opcode to the current cursor position.
- EmitLdelemR8()
- Emits a Ldelem_R8 opcode to the current cursor position.
- EmitLdelemRef()
- Emits a Ldelem_Ref opcode to the current cursor position.
- EmitLdelemU1()
- Emits a Ldelem_U1 opcode to the current cursor position.
- EmitLdelemU2()
- Emits a Ldelem_U2 opcode to the current cursor position.
- EmitLdelemU4()
- Emits a Ldelem_U4 opcode to the current cursor position.
- EmitLdelema(TypeReference)
- Emits a Ldelema opcode with a TypeReference operand to the current cursor position.
- EmitLdelema(Type)
- Emits a Ldelema opcode with a Type operand to the current cursor position.
- EmitLdfld(FieldReference)
- Emits a Ldfld opcode with a FieldReference operand to the current cursor position.
- EmitLdfld(FieldInfo)
- Emits a Ldfld opcode with a FieldInfo operand to the current cursor position.
- EmitLdflda(FieldReference)
- Emits a Ldflda opcode with a FieldReference operand to the current cursor position.
- EmitLdflda(FieldInfo)
- Emits a Ldflda opcode with a FieldInfo operand to the current cursor position.
- EmitLdftn(MethodReference)
- Emits a Ldftn opcode with a MethodReference operand to the current cursor position.
- EmitLdftn(MethodBase)
- Emits a Ldftn opcode with a MethodBase operand to the current cursor position.
- EmitLdindI()
- Emits a Ldind_I opcode to the current cursor position.
- EmitLdindI1()
- Emits a Ldind_I1 opcode to the current cursor position.
- EmitLdindI2()
- Emits a Ldind_I2 opcode to the current cursor position.
- EmitLdindI4()
- Emits a Ldind_I4 opcode to the current cursor position.
- EmitLdindI8()
- Emits a Ldind_I8 opcode to the current cursor position.
- EmitLdindR4()
- Emits a Ldind_R4 opcode to the current cursor position.
- EmitLdindR8()
- Emits a Ldind_R8 opcode to the current cursor position.
- EmitLdindRef()
- Emits a Ldind_Ref opcode to the current cursor position.
- EmitLdindU1()
- Emits a Ldind_U1 opcode to the current cursor position.
- EmitLdindU2()
- Emits a Ldind_U2 opcode to the current cursor position.
- EmitLdindU4()
- Emits a Ldind_U4 opcode to the current cursor position.
- EmitLdlen()
- Emits a Ldlen opcode to the current cursor position.
- EmitLdloc(VariableReference)
- Emits a Ldloc or Ldloc_S opcode with a VariableReference operand to the current cursor position.
- EmitLdloc(int)
- Emits a Ldloc or Ldloc_S opcode with a int operand to the current cursor position.
- EmitLdloc(uint)
- Emits a Ldloc or Ldloc_S opcode with a uint operand to the current cursor position.
- EmitLdloc0()
- Emits a Ldloc_0 opcode to the current cursor position.
- EmitLdloc1()
- Emits a Ldloc_1 opcode to the current cursor position.
- EmitLdloc2()
- Emits a Ldloc_2 opcode to the current cursor position.
- EmitLdloc3()
- Emits a Ldloc_3 opcode to the current cursor position.
- EmitLdloca(VariableReference)
- Emits a Ldloca or Ldloca_S opcode with a VariableReference operand to the current cursor position.
- EmitLdloca(int)
- Emits a Ldloca or Ldloca_S opcode with a int operand to the current cursor position.
- EmitLdloca(uint)
- Emits a Ldloca or Ldloca_S opcode with a uint operand to the current cursor position.
- EmitLdnull()
- Emits a Ldnull opcode to the current cursor position.
- EmitLdobj(TypeReference)
- Emits a Ldobj opcode with a TypeReference operand to the current cursor position.
- EmitLdobj(Type)
- Emits a Ldobj opcode with a Type operand to the current cursor position.
- EmitLdsfld(FieldReference)
- Emits a Ldsfld opcode with a FieldReference operand to the current cursor position.
- EmitLdsfld(FieldInfo)
- Emits a Ldsfld opcode with a FieldInfo operand to the current cursor position.
- EmitLdsflda(FieldReference)
- Emits a Ldsflda opcode with a FieldReference operand to the current cursor position.
- EmitLdsflda(FieldInfo)
- Emits a Ldsflda opcode with a FieldInfo operand to the current cursor position.
- EmitLdstr(string)
- Emits a Ldstr opcode with a string operand to the current cursor position.
- EmitLdtoken(IMetadataTokenProvider)
- Emits a Ldtoken opcode with a IMetadataTokenProvider operand to the current cursor position.
- EmitLdtoken(FieldInfo)
- Emits a Ldtoken opcode with a FieldInfo operand to the current cursor position.
- EmitLdtoken(MethodBase)
- Emits a Ldtoken opcode with a MethodBase operand to the current cursor position.
- EmitLdtoken(Type)
- Emits a Ldtoken opcode with a Type operand to the current cursor position.
- EmitLdvirtftn(MethodReference)
- Emits a Ldvirtftn opcode with a MethodReference operand to the current cursor position.
- EmitLdvirtftn(MethodBase)
- Emits a Ldvirtftn opcode with a MethodBase operand to the current cursor position.
- EmitLeave(Instruction)
- Emits a Leave or Leave_S opcode with a Instruction operand to the current cursor position.
- EmitLeave(ILLabel)
- Emits a Leave or Leave_S opcode with a ILLabel operand to the current cursor position.
- EmitLocalloc()
- Emits a Localloc opcode to the current cursor position.
- EmitMkrefany(TypeReference)
- Emits a Mkrefany opcode with a TypeReference operand to the current cursor position.
- EmitMkrefany(Type)
- Emits a Mkrefany opcode with a Type operand to the current cursor position.
- EmitMulOvf()
- Emits a Mul_Ovf opcode to the current cursor position.
- EmitMulOvfUn()
- Emits a Mul_Ovf_Un opcode to the current cursor position.
- EmitNewarr(TypeReference)
- Emits a Newarr opcode with a TypeReference operand to the current cursor position.
- EmitNewarr(Type)
- Emits a Newarr opcode with a Type operand to the current cursor position.
- EmitNewobj(MethodReference)
- Emits a Newobj opcode with a MethodReference operand to the current cursor position.
- EmitNewobj(MethodBase)
- Emits a Newobj opcode with a MethodBase operand to the current cursor position.
- EmitReadonly()
- Emits a Readonly opcode to the current cursor position.
- EmitRefanytype()
- Emits a Refanytype opcode to the current cursor position.
- EmitRefanyval(TypeReference)
- Emits a Refanyval opcode with a TypeReference operand to the current cursor position.
- EmitRefanyval(Type)
- Emits a Refanyval opcode with a Type operand to the current cursor position.
- EmitReference<T>(in T?)
- Store an object in the reference store, and emit the IL to retrieve it and place it on the stack.
- EmitRemUn()
- Emits a Rem_Un opcode to the current cursor position.
- EmitRethrow()
- Emits a Rethrow opcode to the current cursor position.
- EmitShrUn()
- Emits a Shr_Un opcode to the current cursor position.
- EmitSizeof(TypeReference)
- Emits a Sizeof opcode with a TypeReference operand to the current cursor position.
- EmitSizeof(Type)
- Emits a Sizeof opcode with a Type operand to the current cursor position.
- EmitStarg(ParameterReference)
- Emits a Starg or Starg_S opcode with a ParameterReference operand to the current cursor position.
- EmitStarg(int)
- Emits a Starg or Starg_S opcode with a int operand to the current cursor position.
- EmitStarg(uint)
- Emits a Starg or Starg_S opcode with a uint operand to the current cursor position.
- EmitStelemAny(TypeReference)
- Emits a Stelem_Any opcode with a TypeReference operand to the current cursor position.
- EmitStelemAny(Type)
- Emits a Stelem_Any opcode with a Type operand to the current cursor position.
- EmitStelemI()
- Emits a Stelem_I opcode to the current cursor position.
- EmitStelemI1()
- Emits a Stelem_I1 opcode to the current cursor position.
- EmitStelemI2()
- Emits a Stelem_I2 opcode to the current cursor position.
- EmitStelemI4()
- Emits a Stelem_I4 opcode to the current cursor position.
- EmitStelemI8()
- Emits a Stelem_I8 opcode to the current cursor position.
- EmitStelemR4()
- Emits a Stelem_R4 opcode to the current cursor position.
- EmitStelemR8()
- Emits a Stelem_R8 opcode to the current cursor position.
- EmitStelemRef()
- Emits a Stelem_Ref opcode to the current cursor position.
- EmitStfld(FieldReference)
- Emits a Stfld opcode with a FieldReference operand to the current cursor position.
- EmitStfld(FieldInfo)
- Emits a Stfld opcode with a FieldInfo operand to the current cursor position.
- EmitStindI()
- Emits a Stind_I opcode to the current cursor position.
- EmitStindI1()
- Emits a Stind_I1 opcode to the current cursor position.
- EmitStindI2()
- Emits a Stind_I2 opcode to the current cursor position.
- EmitStindI4()
- Emits a Stind_I4 opcode to the current cursor position.
- EmitStindI8()
- Emits a Stind_I8 opcode to the current cursor position.
- EmitStindR4()
- Emits a Stind_R4 opcode to the current cursor position.
- EmitStindR8()
- Emits a Stind_R8 opcode to the current cursor position.
- EmitStindRef()
- Emits a Stind_Ref opcode to the current cursor position.
- EmitStloc(VariableReference)
- Emits a Stloc or Stloc_S opcode with a VariableReference operand to the current cursor position.
- EmitStloc(int)
- Emits a Stloc or Stloc_S opcode with a int operand to the current cursor position.
- EmitStloc(uint)
- Emits a Stloc or Stloc_S opcode with a uint operand to the current cursor position.
- EmitStloc0()
- Emits a Stloc_0 opcode to the current cursor position.
- EmitStloc1()
- Emits a Stloc_1 opcode to the current cursor position.
- EmitStloc2()
- Emits a Stloc_2 opcode to the current cursor position.
- EmitStloc3()
- Emits a Stloc_3 opcode to the current cursor position.
- EmitStobj(TypeReference)
- Emits a Stobj opcode with a TypeReference operand to the current cursor position.
- EmitStobj(Type)
- Emits a Stobj opcode with a Type operand to the current cursor position.
- EmitStsfld(FieldReference)
- Emits a Stsfld opcode with a FieldReference operand to the current cursor position.
- EmitStsfld(FieldInfo)
- Emits a Stsfld opcode with a FieldInfo operand to the current cursor position.
- EmitSubOvf()
- Emits a Sub_Ovf opcode to the current cursor position.
- EmitSubOvfUn()
- Emits a Sub_Ovf_Un opcode to the current cursor position.
- EmitSwitch(Instruction[])
- Emits a Switch opcode with a Instruction operand to the current cursor position.
- EmitSwitch(ILLabel[])
- Emits a Switch opcode with a ILLabel operand to the current cursor position.
- EmitTail()
- Emits a Tail opcode to the current cursor position.
- EmitThrow()
- Emits a Throw opcode to the current cursor position.
- EmitUnaligned(byte)
- Emits a Unaligned opcode with a byte operand to the current cursor position.
- EmitUnbox(TypeReference)
- Emits a Unbox opcode with a TypeReference operand to the current cursor position.
- EmitUnbox(Type)
- Emits a Unbox opcode with a Type operand to the current cursor position.
- EmitUnboxAny(TypeReference)
- Emits a Unbox_Any opcode with a TypeReference operand to the current cursor position.
- EmitUnboxAny(Type)
- Emits a Unbox_Any opcode with a Type operand to the current cursor position.
- EmitVolatile()
- Emits a Volatile opcode to the current cursor position.
- Emit<T>(OpCode, string)
- Emit a new instruction at this cursor's current position, accessing a given member.
- FindNext(out ILCursor[], params Func<Instruction, bool>[])
- Find the next occurences of a series of instructions matching the given set of predicates with gaps permitted.
- FindPrev(out ILCursor[], params Func<Instruction, bool>[])
- Search backwards for occurences of a series of instructions matching the given set of predicates with gaps permitted.
- Goto(Instruction?, MoveType, bool)
- Move the cursor to a target instruction. All other movements go through this.
- Goto(int, MoveType, bool)
- Move the cursor to a target index. Supports negative indexing. See Goto(Instruction?, MoveType, bool)
- GotoLabel(ILLabel, MoveType, bool)
- Overload for
Goto(label.Target)
.moveType
defaults to MoveType.AfterLabel
- GotoNext(MoveType, params Func<Instruction, bool>[])
- Search forward and moves the cursor to the next sequence of instructions matching the corresponding predicates. See also TryGotoNext(MoveType, params Func<Instruction, bool>[])
- GotoNext(params Func<Instruction, bool>[])
- Search forward and moves the cursor to the next sequence of instructions matching the corresponding predicates. See also TryGotoNext(MoveType, params Func<Instruction, bool>[])
- GotoPrev(MoveType, params Func<Instruction, bool>[])
- Search backward and moves the cursor to the next sequence of instructions matching the corresponding predicates. See also TryGotoPrev(MoveType, params Func<Instruction, bool>[])
- GotoPrev(params Func<Instruction, bool>[])
- Search backward and moves the cursor to the next sequence of instructions matching the corresponding predicates. See also TryGotoPrev(MoveType, params Func<Instruction, bool>[])
- IsAfter(Instruction)
- Is this cursor after the given instruction?
- IsBefore(Instruction)
- Is this cursor before the given instruction?
- MarkLabel()
- Create a new label targetting the current position (
label.Target = Next
) and moves after it.
- MarkLabel(Instruction)
- Create a new label targetting a specific instruction.
- MarkLabel(ILLabel?)
- Set the target of a label to the current position (
label.Target = Next
) and moves after it.
- MoveAfterLabels()
- Move the cursor after incoming labels (branches). If an instruction is emitted, all labels which currently point to Next, will point to the newly emitted instruction.
- MoveAfterLabels(bool)
- Move the cursor after incoming labels (branches). If an instruction is emitted, all labels which currently point to Next, will point to the newly emitted instruction.
- MoveBeforeLabels()
- Move the cursor before incoming labels (branches). This is the default behaviour. Emitted instructions will not cause labels to change targets.
- Remove()
- Remove the Next instruction. Any labels or exception ranges pointing to the instruction will be moved to the following instruction. Cursor position will be maintained.
- RemoveRange(int)
- Remove several instructions. Any labels or exception ranges pointing to the instruction will be moved to the following instruction. Cursor position will be maintained.
- ToString()
- Obtain a string representation of this cursor (method ID, index, search target, surrounding instructions).
- TryFindNext(out ILCursor[], params Func<Instruction, bool>[])
- Find the next occurences of a series of instructions matching the given set of predicates with gaps permitted.
- TryFindPrev(out ILCursor[], params Func<Instruction, bool>[])
- Search backwards for occurences of a series of instructions matching the given set of predicates with gaps permitted.
- TryGotoNext(MoveType, params Func<Instruction, bool>[])
- Search forward and moves the cursor to the next sequence of instructions matching the corresponding predicates.
- TryGotoNext(params Func<Instruction, bool>[])
- Search forward and moves the cursor to the next sequence of instructions matching the corresponding predicates.
- TryGotoPrev(MoveType, params Func<Instruction, bool>[])
- Search backward and moves the cursor to the next sequence of instructions matching the corresponding predicates.
- TryGotoPrev(params Func<Instruction, bool>[])
- Search backward and moves the cursor to the next sequence of instructions matching the corresponding predicates.