private void RunWorker() { _currentDispatcher = this; for (;;) { try {} catch (Exception e) { if (UnhandledExceptionFilter != null) { DispatcherUnhandledExceptionFilterEventArgs args = new DispatcherUnhandledExceptionFilterEventArgs(this, e); if (UnhandledException != null && args.RequestCatch == false) { UnhandledException(this, new DispatcherUnhandledExceptionEventArgs(this, e)); } } } } // _currentDispatcher = null; }