/// <summary> /// Formats message. /// </summary> /// <param name="fileWatcherStoppedEventArgs">Message.</param> /// <returns>Formatted message.</returns> /// <exception cref="ArgumentNullException">fileWatcherStoppedEventArgs is null.</exception> public string Format(FileWatcherStoppedEventArgs fileWatcherStoppedEventArgs) { if (fileWatcherStoppedEventArgs == null) { throw new ArgumentNullException("fileWatcherStoppedEventArgs", Resources.ArgumentNullException); } return(String.Format(CultureInfo.CurrentCulture, @Resources.MessageDaemonStopped, @DateTime.Now, @Resources.MessageTypeInfo, @fileWatcherStoppedEventArgs.DaemonName)); }
/// <summary> /// Handles file watcher stopped 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 OnFileWatcherStopped(object sender, FileWatcherStoppedEventArgs e) { if (e == null) { throw new ArgumentNullException("e", Resources.ArgumentNullException); } base.OnFileWatcherStopped(sender, e); ResetInfo(e.DaemonName); UpdateList(false); UpdateRunningFileWatchers(); }
/// <summary> /// Handles file watcher stopped 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 OnFileWatcherStopped(object sender, FileWatcherStoppedEventArgs e) { if (e == null) { throw new ArgumentNullException("e", Resources.ArgumentNullException); } base.OnFileWatcherStopped(sender, e); _consoleView.EchoLine(String.Format(CultureInfo.CurrentCulture, @Resources.MessageDaemonStopped, @e.DaemonName)); }
/// <summary> /// Handles file watcher stopped event. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">Event data.</param> protected virtual void OnFileWatcherStopped(object sender, FileWatcherStoppedEventArgs e) { AddLogMessage(_formatter.Format(e)); }
/// <summary> /// Handles file watcher stopped event. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">Event data.</param> protected virtual void OnFileWatcherStopped(object sender, FileWatcherStoppedEventArgs e) { _logger.Log(_formatter.Format(e)); }
/// <summary> /// Formats message. /// </summary> /// <param name="fileWatcherStoppedEventArgs">Message.</param> /// <returns>Formatted message.</returns> /// <exception cref="ArgumentNullException">fileWatcherStoppedEventArgs is null.</exception> public string Format(FileWatcherStoppedEventArgs fileWatcherStoppedEventArgs) { if (fileWatcherStoppedEventArgs == null) { throw new ArgumentNullException("fileWatcherStoppedEventArgs", Resources.ArgumentNullException); } return String.Format(CultureInfo.CurrentCulture, @Resources.MessageDaemonStopped, @DateTime.Now, @Resources.MessageTypeInfo, @fileWatcherStoppedEventArgs.DaemonName); }
/// <summary> /// Handles file watcher stopped event. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">Event data.</param> private void OnFileWatcherStopped(object sender, FileWatcherStoppedEventArgs e) { EventHandler<FileWatcherStoppedEventArgs> handler = FileWatcherStopped; if (handler != null) { handler(this, e); } }