I am writing some code that checks that my resources are properly cleaned up.
When the application is shutdown, resources are not cleaned up, which is fine. However, thi
/// /// Hack to check if the application is shutting down. /// public static bool IsShuttingDown() { try { Application.Current.ShutdownMode = Application.Current.ShutdownMode; return false; } catch (Exception) { return true; } }