internal static void OriginalMethodBodyEmit( ILGenerator il, MethodBase meth, int offset, bool hasReturn) { using (MethodBodyReader reader = new MethodBodyReader(meth)) { using (MethodBodyEditor editor = reader.GetEditor()) editor.WriteIL(il, offset, hasReturn); // dispose editor } // dispose reader }
internal static void OriginalMethodBodyEmit( ILGenerator il, MethodBase meth, int offset, bool hasReturn) { MethodBodyReader reader = new MethodBodyReader(meth); MethodBodyEditor editor = reader.GetEditor(); editor.WriteIL(il, offset, hasReturn); reader.Dispose(); editor.Dispose(); }