public ExceptionViewController(IExceptionViewService service) { if (service == null) throw new ArgumentNullException("service"); this.service = service; }
private void App_DispatcherUnhandledException( object sender, System.Windows.Threading.DispatcherUnhandledExceptionEventArgs e) { if (m_serviceProvider != null) { IExceptionViewService exceptionViewService = m_serviceProvider.GetRequiredService <IExceptionViewService>(); exceptionViewService.Show(e.Exception); } else { MessageBox.Show(e.Exception.ToString(), "Unhandled exception"); } e.Handled = true; }