Unload event for the default AppDomain?
Posted
by
Zor
on Stack Overflow
See other posts from Stack Overflow
or by Zor
Published on 2010-12-28T21:49:33Z
Indexed on
2010/12/28
21:54 UTC
Read the original article
Hit count: 203
Hi,
I need to have an event fired whenever any AppDomain unloads - including the default one of the process. The problem with AppDomain.DomainUnload is that it only fires for non-default AppDomains. Furthermore, AppDomain.ProcessExit has limited execution time, which I cannot rely on.
Any suggestions as to how I can achieve this would be greatly appreciated!
(Alternatively, having an event fired when a background thread (Thread.IsBackground == True) works too.)
Thanks in advance.
© Stack Overflow or respective owner