/// <summary> /// Stop the service. /// </summary> protected override void OnStop() { StatusReporter.OnPreStopping(); // Clean up the directory watcher and crash processor threads foreach (var Processor in Processors) { Processor.RequestStop(); } foreach (var Processor in Processors) { Processor.Dispose(); } Processors.Clear(); Watcher.Dispose(); Watcher = null; StatusReporter.Dispose(); StatusReporter = null; Slack.Dispose(); Slack = null; // Flush the log to disk Log.Dispose(); Log = null; }
/// <summary> /// Stop the service. /// </summary> protected override void OnStop() { StatusReporter.OnPreStopping(); OnDispose(); }