Table of Contents

Method MatchBranch

Namespace
MonoMod.Cil
Assembly
MonoMod.Utils.dll

MatchBranch(Instruction, ILLabel)

Matches a branch instruction.
public static bool MatchBranch(this Instruction instr, ILLabel value)

Parameters

instr Instruction
The instruction to try to match.
value ILLabel
The operand value required for the instruction to match.

Returns

bool
true if the instruction matches; false otherwise.

Remarks

This will match an instruction whose opcode is Br, Brfalse, Brtrue, Beq, Bge, Bgt, Ble, Blt, Bne_Un, Bge_Un, Bgt_Un, Ble_Un or Blt_Un.

MatchBranch(Instruction, Instruction)

Matches a branch instruction.
public static bool MatchBranch(this Instruction instr, Instruction value)

Parameters

instr Instruction
The instruction to try to match.
value Instruction
The operand value required for the instruction to match.

Returns

bool
true if the instruction matches; false otherwise.

Remarks

This will match an instruction whose opcode is Br, Brfalse, Brtrue, Beq, Bge, Bgt, Ble, Blt, Bne_Un, Bge_Un, Bgt_Un, Ble_Un or Blt_Un.

MatchBranch(Instruction, out ILLabel)

Matches a branch instruction.
public static bool MatchBranch(this Instruction instr, out ILLabel value)

Parameters

instr Instruction
The instruction to try to match.
value ILLabel
The operand value of the instruction.

Returns

bool
true if the instruction matches; false otherwise.

Remarks

This will match an instruction whose opcode is Br, Brfalse, Brtrue, Beq, Bge, Bgt, Ble, Blt, Bne_Un, Bge_Un, Bgt_Un, Ble_Un or Blt_Un.