VirtualMethodInterceptor with internal classes

Dec 12, 2009 at 9:31 PM

VirtualMethodInterceptor doesn't seem to work with internal classes.  I was able to get it to work by adding this to my assemblyinfo.cs:

   [assembly: InternalsVisibleTo("Unity_ILEmit_DynamicClasses")]

and then hacking VirtualMethodInterceptor.CanIntercept to not require the target class to be public.

Is there some other way to get this to work without changing the Unity source?



Dec 14, 2009 at 11:51 PM

I filed a bug: