On Mon, Nov 29, 2010 at 7:13 PM, Jeff Nevins <[email protected]> wrote:
> Works great! Peverifies fine, but for some reason when I use the code:
>
> processor.InsertBefore(insertBefore, processor.Create(OpCodes.Ldtoken,
> method.Module.Import(method)));
>
> When viewing in C# mode in Reflector it bugs out and crashes (IL mode
> displays fine).
>
> Anyone have any ideas on this one?

It may be simply be the case that the code you're injecting is
confusing Reflector's decompiler. Especially as `ldtoken method` has
no C# representation (iirc, Reflector outputs a non existing methodof
operator in this case), so in the end, it's impossible to know without
having a full IL sample of a method after you instrumented it.

-- 
--
mono-cecil

Reply via email to