Process-wide "AssemblyLoad" Event
I can receive events, using the AppDomain.AssemblyLoad event, but only for a particular app domain. If I have appdomains that recursively create more appdomains,开发者_JAVA百科 I believe my AssemblyLoad event will not work for those "grand-child" appdomains.
How can I be sure to get an AssemblyLoad event triggered, regardless of what appdomain loaded an assembly?
Each AD will have to register its own AssemblyLoad event. You will obviously miss at least the 1st assembly you load into it. The idea of a "process-side" event is murky, these event handlers cannot share anything since each AD has its own garbage collected heap. I guess you could serialize info back to the primary AD.
精彩评论