/// <inheritdoc /> public void Dispose() { try { SystemDb.Instance.Dispose(); KeyboardHotKeyService.Instance.Dispose(); foreach (var plugin in Plugins) { try { plugin.Dispose(); } catch (Exception ex) { LogTo.Error(ex, "Plugin threw an exception while disposing."); } } Application.Dispatcher.InvokeShutdown(); } catch (Exception ex) { LogTo.Error(ex, "Plugin host threw an exception while disposing."); } Container.Dispose(); Logger.Instance.Shutdown(); SentryInstance.Dispose(); }
public void Dispose() { HasExited = true; CleanupHooks(); _dataAvailableEvent.Dispose(); _smProcess.Dispose(); SentryInstance.Dispose(); }
public void Run(RemoteHooking.IContext inContext, string channelName) { try { try { InstallHooks(); InstallSM(); SMA.OnHookInstalled(true); } catch (Exception ex) { SMA.OnHookInstalled(false, ex); return; } finally { RemoteHooking.WakeUpProcess(); } DispatchMessages(); } catch (RemotingException) { // Channel closed, exit. SMA = null; } catch (Exception ex) { try { SMA.OnException(ex); } catch { // ignored } } finally { HasExited = true; CleanupHooks(); SentryInstance.Dispose(); } }