Ejemplo n.º 1
0
        /// <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);
            }
        }
Ejemplo n.º 2
0
 private static void HandleConnectStateChanged(object sender, ConnectionStateChangedEventArgs e)
 {
     Log("Connect state changed: {0}", e.ConnectionState);
 }