/// <summary> /// Disassembles the given method. /// </summary> /// <param name="method">The method to disassemble.</param> /// <param name="notSupportedILinstructionHandler">Event handler for IL instructions that are not supported.</param> /// <param name="sequencePointEnumerator">The assocated sequence-point enumerator.</param> /// <returns>The disassembled method.</returns> internal static DisassembledMethod Disassemble( MethodBase method, EventHandler <ILOpCode> notSupportedILinstructionHandler, SequencePointEnumerator sequencePointEnumerator) { var context = new DisassemblerContext(method, sequencePointEnumerator); context.NotSupportedILInstruction += notSupportedILinstructionHandler; return(context.Disassemble()); }
/// <summary> /// Disassembles the given method. /// </summary> /// <param name="method">The method to disassemble.</param> /// <param name="sequencePointEnumerator">The assocated sequence-point enumerator.</param> /// <returns>The disassembled method.</returns> public static DisassembledMethod Disassemble(MethodBase method, SequencePointEnumerator sequencePointEnumerator) { var context = new DisassemblerContext(method, sequencePointEnumerator); return(context.Disassemble()); }