/// <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));
 }
Esempio 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));
 }
Esempio 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();
 }
Esempio 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);
 }