Exemplo n.º 1
0
 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
 }
Exemplo n.º 2
0
        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();
        }