Exemplo n.º 1
0
 /// <summary>
 /// Handles service called event.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">Event data.</param>
 protected virtual void OnServiceCalled(object sender, 
     ServiceCalledEventArgs e)
 {
     _logger.Log(_formatter.Format(e));
 }
Exemplo n.º 2
0
 /// <summary>
 /// Handles service called event.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">Event data.</param>
 protected virtual void OnServiceCalled(object sender,
     ServiceCalledEventArgs e)
 {
     AddLogMessage(_formatter.Format(e));
 }
Exemplo n.º 3
0
 /// <summary>
 /// Handles service called event.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">Event data.</param>
 protected override void OnServiceCalled(object sender,
     ServiceCalledEventArgs e)
 {
     base.OnServiceCalled(sender, e);
     UpdateRunningProcesses();
 }
Exemplo n.º 4
0
 /// <summary>
 /// Formats message.
 /// </summary>
 /// <param name="serviceCalledEventArgs">Message.</param>
 /// <returns>Formatted message.</returns>
 /// <exception cref="ArgumentNullException">serviceCalledEventArgs is null.</exception>
 public string Format(ServiceCalledEventArgs serviceCalledEventArgs)
 {
     if (serviceCalledEventArgs == null)
     {
         throw new ArgumentNullException("serviceCalledEventArgs",
                                         Resources.ArgumentNullException);
     }
     return String.Format(CultureInfo.CurrentCulture,
                          @Resources.MessageServiceCalled,
                          @DateTime.Now,
                          @Resources.MessageTypeInfo,
                          @serviceCalledEventArgs.DaemonName,
                          @serviceCalledEventArgs.Id,
                          @serviceCalledEventArgs.Message);
 }