Open GoogleCodeExporter opened 9 years ago
I managed to reproduce the bug but it'll take a while for me to do in
Mono.Cecil what
DP1 does with System.Reflection.Emit. The problem seems to be that the Proxy
Factory
class needs to generate a proxy type that matches the type attribute flags of
the
nested base class that it's inheriting.
Here are the proxy type attributes being used in DP1:
TypeAttributes typeAttributes = TypeAttributes.AutoClass | TypeAttributes.Class
|
TypeAttributes.Public |
TypeAttributes.BeforeFieldInit;
Here are the proxy type attributes being used in DP2:
var attributes = TypeAttributes.AutoClass | TypeAttributes.Class |
TypeAttributes.BeforeFieldInit | TypeAttributes.Public;
Strangely enough, the DP1 version (the one that uses System.Reflection.Emit)
works
fine, while the version that uses Cecil cannot properly create nested proxy
types.
I'll have to check with Jb Evain and see what he says about it.
Original comment by Philip.L...@gmail.com
on 15 Sep 2009 at 5:05
Original issue reported on code.google.com by
petetran...@petegoo.com
on 14 Sep 2009 at 11:15