/// <summary> /// Discovery timer event handler - called when the allocated discovery period has ended /// </summary> /// <param name="state">Timer state</param> private void OnDiscoveryCompleteTimer(object state) { LogMessage("OnTimeOutTimerFired", $"Firing discovery complete event"); DiscoveryComplete = true; // Flag that the timer out has expired bool statusMessagesUpdated = false; // Update the status messages of management API calls that didn't connect in time lock (deviceListLockObject) // Make sure that the device list dictionary can't change while being read and that only one thread can update it at a time { foreach (KeyValuePair <IPEndPoint, AlpacaDevice> alpacaDevice in alpacaDeviceList) { if (alpacaDevice.Value.StatusMessage == Constants.TRYING_TO_CONTACT_MANAGEMENT_API_MESSAGE) { alpacaDevice.Value.StatusMessage = Constants.FAILED_TO_CONTACT_MANAGEMENT_API_MESSAGE; statusMessagesUpdated = true; } } } if (statusMessagesUpdated) { RaiseAnAlpacaDevicesChangedEvent(); // Raise a devices changed event if any status messages have been updated } DiscoveryCompleted?.Invoke(this, EventArgs.Empty); // Raise an event to indicate that discovery is complete }
void OnDiscoveryCompleted() { IsDiscoveringTests = false; DiscoveryCompleted?.Invoke(this, new EventArgs()); }
void OnDiscoveryCompleted(HubDiscoreryResult hubDiscoreryResult) { DiscoveryCompleted?.Invoke(this, new HubDisoveryCompletedEventArgs(hubDiscoreryResult)); }
private void RaiseDiscoveryComplete(IEnumerable <string> sourceAssemblyPaths, bool wasDiscoveryAborted) { DiscoveryCompleted?.Invoke(this, new DiscoveryCompletedEventArgs(sourceAssemblyPaths, wasDiscoveryAborted)); }
void OnDiscoveryCompleted() { DiscoveryCompleted?.Invoke(this, new EventArgs()); }
private void RemoteSystemWatcher_Complete(RemoteSystemWatcher watcher) { DiscoveryCompleted?.Invoke(this, null); }