示例#1
0
 /// <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));
 }
示例#2
0
        /// <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();
        }
示例#3
0
        /// <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));
 }
示例#6
0
 /// <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));
 }
示例#7
0
        /// <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>
 protected virtual void OnFileWatcherStopped(object sender,
     FileWatcherStoppedEventArgs e)
 {
     AddLogMessage(_formatter.Format(e));
 }
示例#9
0
 /// <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);
 }
示例#10
0
        /// <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));
        }
示例#11
0
 /// <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);
     }
 }