Beispiel #1
0
        public static void StopThread()
        {
            RMLog.Info("Stopping Ignored IPs Thread");

            if (_IgnoredIPsThread != null)
            {
                try {
                    _IgnoredIPsThread.Stop();
                    _IgnoredIPsThread.Dispose();
                    _IgnoredIPsThread = null;
                } catch (Exception ex) {
                    RMLog.Exception(ex, "Error in IgnoredIPsThread::StopThread()");
                }
            }
        }
Beispiel #2
0
        private void Dispose(bool disposing)
        {
            // Check to see if Dispose has already been called.
            if (!_Disposed)
            {
                // If disposing equals true, dispose all managed
                // and unmanaged resources.
                if (disposing)
                {
                    // Dispose managed resources.
                    if (_FlashSocketPolicyServerThread != null)
                    {
                        _FlashSocketPolicyServerThread.Stop();
                        _FlashSocketPolicyServerThread.Dispose();
                    }
                    if (_IgnoredIPsThread != null)
                    {
                        _IgnoredIPsThread.Stop();
                        _IgnoredIPsThread.Dispose();
                    }
                    if (_LogTimer != null)
                    {
                        _LogTimer.Stop();
                        _LogTimer.Dispose();
                    }
                }

                // Call the appropriate methods to clean up
                // unmanaged resources here.
                // If disposing is false,
                // only the following code is executed.

                // Note disposing has been done.
                _Disposed = true;
            }
        }