/// <summary> /// Handles file watcher started event. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">Event data.</param> protected override void OnFileWatcherStarted(object sender, FileWatcherStartedEventArgs e) { base.OnFileWatcherStarted(sender, e); // Set can stop all. _canStopAll.Set(); }
/// <summary> /// Formats message. /// </summary> /// <param name="fileWatcherStartedEventArgs">Message.</param> /// <returns>Formatted message.</returns> /// <exception cref="ArgumentNullException">fileWatcherStartedEventArgs is null.</exception> public string Format(FileWatcherStartedEventArgs fileWatcherStartedEventArgs) { if (fileWatcherStartedEventArgs == null) { throw new ArgumentNullException("fileWatcherStartedEventArgs", Resources.ArgumentNullException); } return(String.Format(CultureInfo.CurrentCulture, @Resources.MessageDaemonStarted, @DateTime.Now, @Resources.MessageTypeInfo, @fileWatcherStartedEventArgs.DaemonName)); }
/// <summary> /// Handles file watcher started 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 OnFileWatcherStarted(object sender, FileWatcherStartedEventArgs e) { if (e == null) { throw new ArgumentNullException("e", Resources.ArgumentNullException); } base.OnFileWatcherStarted(sender, e); SetStartedState(e.DaemonName); UpdateList(false); UpdateRunningFileWatchers(); }
/// <summary> /// Handles file watcher started 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 OnFileWatcherStarted(object sender, FileWatcherStartedEventArgs e) { if (e == null) { throw new ArgumentNullException("e", Resources.ArgumentNullException); } base.OnFileWatcherStarted(sender, e); _consoleView.EchoLine(String.Format(CultureInfo.CurrentCulture, @Resources.MessageDaemonStarted, @e.DaemonName)); // Set can stop all. _canStopAll.Set(); }
/// <summary> /// Handles file watcher started event. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">Event data.</param> protected virtual void OnFileWatcherStarted(object sender, FileWatcherStartedEventArgs e) { AddLogMessage(_formatter.Format(e)); }
/// <summary> /// Handles file watcher started event. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">Event data.</param> protected virtual void OnFileWatcherStarted(object sender, FileWatcherStartedEventArgs e) { _logger.Log(_formatter.Format(e)); }
/// <summary> /// Formats message. /// </summary> /// <param name="fileWatcherStartedEventArgs">Message.</param> /// <returns>Formatted message.</returns> /// <exception cref="ArgumentNullException">fileWatcherStartedEventArgs is null.</exception> public string Format(FileWatcherStartedEventArgs fileWatcherStartedEventArgs) { if (fileWatcherStartedEventArgs == null) { throw new ArgumentNullException("fileWatcherStartedEventArgs", Resources.ArgumentNullException); } return String.Format(CultureInfo.CurrentCulture, @Resources.MessageDaemonStarted, @DateTime.Now, @Resources.MessageTypeInfo, @fileWatcherStartedEventArgs.DaemonName); }
/// <summary> /// Handles file watcher started event. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">Event data.</param> private void OnFileWatcherStarted(object sender, FileWatcherStartedEventArgs e) { EventHandler<FileWatcherStartedEventArgs> handler = FileWatcherStarted; if (handler != null) { handler(this, e); } }