开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜