When ModuleBuilder.GetType(string) is used to construct an array from an
unfinished type (like in the previous bug I reported), the
AppDomain.TypeResolve event is fired for the unfinished type. I think
this is wrong. It's easy to workaround by setting a global flag before
calling ModuleBuilder.GetType(string) and then ignoring the TypeResolve
event that occurs during that call (returning null from the TypeResolve
handler), but this is obviously less than ideal.

I've got another request for AppDomain.TypeResolve, it would be very
nice if the ResolveEventArgs object contained the assembly it thinks
that the type might live in. So this would be:
- for TypeBuilder triggered resolve actions, the dynamic assembly that
the type lives in
- for Type.GetType(string) triggered actions the calling assembly

I think this would make sense. Feel free to contact me off-line for
further discussion.

Regards,
Jeroen

Reply via email to