/// <summary>
 /// Dispatcher ShutdownStarted event.
 /// This is triggered when a dispatcher begins shutting down.
 /// </summary>
 void m_dispatcher_ShutdownStarted(object sender, DispatcherShutdownEventArgs e)
 {
     Cleanup();
 }
 /// <summary>
 /// Dispatcher ShutdownStarted event.
 /// This is triggered when a dispatcher begins shutting down.
 /// </summary>
 private void shutdownStarted(object sender, DispatcherShutdownEventArgs e)
 {
     Dispose();
 }
 /// <summary>
 /// ShutdownStarted event.
 /// This gets called when the dispatcher is asked to shutdown.
 /// </summary>
 void shutdownStarted(object sender, DispatcherShutdownEventArgs e)
 {
     cleanup();
 }