VirtualMethodInterceptor with internal classes

Dec 12, 2009 at 10: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?

Thanks

Andy

Dec 15, 2009 at 12:51 AM

I filed a bug: http://unity.codeplex.com/WorkItem/View.aspx?WorkItemId=6623