Exemple #1
0
 /// <summary>
 ///     Dispose
 /// </summary>
 /// <param name="disposing"></param>
 protected virtual void Dispose(bool disposing)
 {
     if (disposing)
     {
         FilesystemListener?.Dispose();
     }
 }
Exemple #2
0
        /// <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");
        }