Esempio n. 1
0
 public void StopPolling()
 {
     if (pollingThreadState == PollingThreadState.Stopped) throw new ApplicationException("Can't stop polling as it isn't running.");
     pollingThreadState = PollingThreadState.Stopping;
 }
		public PollingThread(PollingThreadSettings threadSettings, ILog log)
		{
			_log = log;
			ThreadSettings = threadSettings;
			_threadState = new PollingThreadState();
		}
Esempio n. 3
0
 public void StartPolling()
 {
     if (pollingThreadState != PollingThreadState.Stopped) throw new ApplicationException("Can't start polling as it is still running.");
     pollingThreadState = PollingThreadState.Running;
     pollingThread = new Thread(PollingThreadMain);
     pollingThread.IsBackground = true;
     pollingThread.Start();
 }