/// <summary>
		/// Constructor for ConnectionManager.
		/// </summary>
		/// <param name="detectionStrategy">The ConnectionDetectionStrategy chosen from the config file</param>
		/// <param name="pollingIntervalInSeconds">Interval in seconds at which the ConnectionDetectionStrategy will be polled</param>
		public ConnectionManager(IConnectionDetectionStrategy detectionStrategy, int pollingIntervalInSeconds)
		{
			this.detector = new ConnectionDetector(detectionStrategy, this);
			this.pollInterval = pollingIntervalInSeconds * ConversionToMilliSeconds;
			thread = new ThreadRunner(new ThreadStart(WorkerMethod));
		}
Example #2
0
 /// <summary>
 /// Constructor for ConnectionManager.
 /// </summary>
 /// <param name="detectionStrategy">The ConnectionDetectionStrategy chosen from the config file</param>
 /// <param name="pollingIntervalInSeconds">Interval in seconds at which the ConnectionDetectionStrategy will be polled</param>
 public ConnectionManager(IConnectionDetectionStrategy detectionStrategy, int pollingIntervalInSeconds)
 {
     this.detector     = new ConnectionDetector(detectionStrategy, this);
     this.pollInterval = pollingIntervalInSeconds * ConversionToMilliSeconds;
     thread            = new ThreadRunner(new ThreadStart(WorkerMethod));
 }