/// <summary> /// Handles file watcher starting event. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">Event data.</param> /// <exception cref="ArgumentNullException">e is null.</exception> protected override void OnFileWatcherStarting(object sender, FileWatcherStartingEventArgs e) { if (e == null) { throw new ArgumentNullException("e", Resources.ArgumentNullException); } base.OnFileWatcherStarting(sender, e); SetStartingState(e.DaemonName); UpdateList(false); }
/// <summary> /// Formats message. /// </summary> /// <param name="fileWatcherStartingEventArgs">Message.</param> /// <returns>Formatted message.</returns> /// <exception cref="ArgumentNullException">fileWatcherStartingEventArgs is null.</exception> public string Format(FileWatcherStartingEventArgs fileWatcherStartingEventArgs) { if (fileWatcherStartingEventArgs == null) { throw new ArgumentNullException("fileWatcherStartingEventArgs", Resources.ArgumentNullException); } return(String.Format(CultureInfo.CurrentCulture, @Resources.MessageDaemonStarting, @DateTime.Now, @Resources.MessageTypeInfo, @fileWatcherStartingEventArgs.DaemonName)); }
/// <summary> /// Handles file watcher starting event. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">Event data.</param> protected override void OnFileWatcherStarting(object sender, FileWatcherStartingEventArgs e) { base.OnFileWatcherStarting(sender, e); // If starting the file watchers then start updating if not already updating. lock (_lockUpdateTimer) { if (!_updateTimer.Enabled) { _updateTimer.Enabled = true; } } }
/// <summary> /// Handles file watcher starting event. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">Event data.</param> protected virtual void OnFileWatcherStarting(object sender, FileWatcherStartingEventArgs e) { AddLogMessage(_formatter.Format(e)); }
/// <summary> /// Handles file watcher starting event. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">Event data.</param> protected virtual void OnFileWatcherStarting(object sender, FileWatcherStartingEventArgs e) { _logger.Log(_formatter.Format(e)); }