Example #1
0
        public static Instruction Create(OpCode opCode, IInstructionReference instructionRef)
        {
            if (instructionRef == null)
            {
                throw new ArgumentNullException("instructionRef");
            }

            if (opCode.OperandType != OperandType.InlineBrTarget &&
                opCode.OperandType != OperandType.ShortInlineBrTarget)
            {
                throw new ArgumentException("opCode");
            }

            return(new Instruction(opCode, instructionRef));
        }
Example #2
0
 public void Emit(OpCode opCode, IInstructionReference instructionRef)
 {
     Emit(Instruction.Create(opCode, instructionRef));
 }