private InstructionToInsert GenerateNewCode(int index, SequencePoint lastSequencePoint, Instruction ins, MethodReference newMethod) { var imported = ModuleDefinition.Import(newMethod); ins.Operand = imported; var source = sequencePointExtrator.GetSourceCode(lastSequencePoint); var loadString = Instruction.Create(OpCodes.Ldstr, source); var newInstruction = new InstructionToInsert(index, loadString); return(newInstruction); }
private InstructionToInsert GenerateNewCode(int index, SequencePoint lastSequencePoint, Instruction ins, MethodReference newMethod) { var imported = ModuleDefinition.Import(newMethod); ins.Operand = imported; var source = sequencePointExtrator.GetSourceCode(lastSequencePoint); var loadString = Instruction.Create(OpCodes.Ldstr, source); var newInstruction = new InstructionToInsert(index, loadString); return newInstruction; }