}//end Start()

        public void Stop()
        {
            try
            {
                MonitorStatus = MonitorStatus.Stopped;
                _stopwatch?.Stop();
                _nhMonitor?.Stop();
            }
            catch (Exception e)
            {
                _genericLog.Error($"{_nameOfThis} - Exception while Stopping {_nameOfThis} regarding {_element}: {e.Message}");
                _genericLog.Debug($"{_nameOfThis} - Exception while Stopping {_nameOfThis} regarding {_element}: {e.StackTrace}");
                if (!ContinueOnError)
                {
                    throw;
                }
            }
        }//end Stop()
예제 #2
0
        }//end Start()

        public void Stop()
        {
            if (!_run)
            {
                return;
            }
            try
            {
                MonitorStatus = MonitorStatus.Stopped;
                _usageMonitor?.Stop();

                _nhMonitor?.Stop();
            }
            catch (Exception e)
            {
                _genericLog.Error($"{_nameOfThis} - Exception while Stopping {_nameOfThis}: {e.Message}");
                _genericLog.Debug($"{_nameOfThis} - Exception while Stopping {_nameOfThis}: {e.StackTrace}");
                if (!ContinueOnError)
                {
                    throw;
                }
            }
        }//end Stop()