public void Finish() {
ReloadConfig.Logger(ReloadGlobals.TRACEFLAGS.T_INFO, "Shutdown...");
// delete local certificate
X509Store store = new X509Store(StoreName.My, StoreLocation.CurrentUser);
store.Open(OpenFlags.ReadWrite);
store.Remove(m_ReloadConfig.MyCertificate);
store.Close();
ReloadConfig.Logger(ReloadGlobals.TRACEFLAGS.T_INFO, "Deleted Local Certificate");
ReloadConfig.State = ReloadConfig.RELOAD_State.Exit;
stateUpdates(ReloadConfig.RELOAD_State.Exit);
try {
if (m_interface_flm != null) {
m_interface_flm.ShutDown();
m_interface_flm = null;
}
}
catch (Exception ex) {
ReloadConfig.Logger(ReloadGlobals.TRACEFLAGS.T_ERROR, "Link Shutdown: " + ex.Message);
}
try {
ReloadConfig.State = 0;
/* if (ReloadConfig.DispatcherQueue != null)
ReloadConfig.DispatcherQueue.Dispose();
*/
if (ReloadConfig.Dispatcher != null)
ReloadConfig.Dispatcher.Dispose();
ReloadConfig.State = ReloadConfig.RELOAD_State.Exit;
// ReloadConfig.DispatcherQueue = null;
ReloadConfig.Dispatcher = null;
}
catch (Exception ex) {
ReloadConfig.Logger(ReloadGlobals.TRACEFLAGS.T_ERROR, "Dispatcher Dispose: " + ex.Message);
}
}