public static void Stop() { try { _ProcessWatcher?.Deactivate(); InfoDispatcher.Deacitvate(); AppDomain.CurrentDomain.UnhandledException -= AppDomainUnhandledExceptionHandler; } catch (Exception ex) { Settings.Log?.Fatal(ex); } }
public static void Start() { try { AppDomain.CurrentDomain.UnhandledException += AppDomainUnhandledExceptionHandler; Settings.Initialize(); if (!string.IsNullOrWhiteSpace(Settings.Config.SharedDataFolder)) { InfoDispatcher.Acitvate(); } _ProcessWatcher = new ProcessWatcher(); } catch (Exception ex) { Settings.Log?.Fatal(ex); } }