/// <summary> /// Constructor for ConnectionDetector /// </summary> /// <param name="connectionDetectionStrategy">The detection strategy chosen through the config file</param> /// <param name="connectionManager">The connection manager instance</param> public ConnectionDetector(IConnectionDetectionStrategy connectionDetectionStrategy, ConnectionManager connectionManager) { this.connectionDetectionStrategy = connectionDetectionStrategy; this.connectionManager = connectionManager; }
/// <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)); }
/// <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)); }
/// <summary> /// Constructor for ConnectionDetector /// </summary> /// <param name="connectionDetectionStrategy">The detection strategy chosen through the config file</param> /// <param name="connectionManager">The connection manager instance</param> public ConnectionDetector(IConnectionDetectionStrategy connectionDetectionStrategy, ConnectionManager connectionManager) { this.connectionDetectionStrategy = connectionDetectionStrategy; this.connectionManager = connectionManager; }