/// <summary> /// Raises the NetFileSystemWatcher.ConnectionStateChanged event. /// </summary> /// <param name="eventArgs">A ConnectionStateChangedEventArgs that contain the event data.</param> protected virtual void OnConnecionStateChanged(ConnectionStateChangedEventArgs eventArgs) { // Copy to temp to be thread safe. var temp = ConnectionStateChanged; if (temp != null) { temp(this, eventArgs); } }
private static void HandleConnectStateChanged(object sender, ConnectionStateChangedEventArgs e) { Log("Connect state changed: {0}", e.ConnectionState); }