/// <summary> /// Dispose /// </summary> /// <param name="disposing"></param> protected virtual void Dispose(bool disposing) { if (disposing) { FilesystemListener?.Dispose(); } }
/// <summary> /// <c>StopListener</c> /// The method called by Topshelf to halt the service /// </summary> public void Stop() { if (WatchSocket) { SocketListener.ShutDown(); //SocketListener.Dispose(); } if (WatchFileSystem) { FilesystemListener.ShutDown(); FilesystemListener.Dispose(); } SaveConfiguration(); EventLogger.Info("sevice stopped"); }