/// <summary> /// Handles service begin called event. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">Event data.</param> protected virtual void OnServiceBeginCall(object sender, ServiceBeginCallEventArgs e) { _logger.Log(_formatter.Format(e)); }
/// <summary> /// Handles service begin called event. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">Event data.</param> protected virtual void OnServiceBeginCall(object sender, ServiceBeginCallEventArgs e) { AddLogMessage(_formatter.Format(e)); }
/// <summary> /// Handles service begin called 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 OnServiceBeginCall(object sender, ServiceBeginCallEventArgs e) { if (e == null) { throw new ArgumentNullException("e", Resources.ArgumentNullException); } base.OnServiceBeginCall(sender, e); UpdateRunningProcesses(); UpdateProcessesToRun(e.QueuedProcesses); }
/// <summary> /// Formats message. /// </summary> /// <param name="serviceBeginCallEventArgs">Message.</param> /// <returns>Formatted message.</returns> /// <exception cref="ArgumentNullException">serviceBeginCallEventArgs is null.</exception> public string Format(ServiceBeginCallEventArgs serviceBeginCallEventArgs) { if (serviceBeginCallEventArgs == null) { throw new ArgumentNullException("serviceBeginCallEventArgs", Resources.ArgumentNullException); } return String.Format(CultureInfo.CurrentCulture, @Resources.MessageServiceBeginCall, @DateTime.Now, @Resources.MessageTypeInfo, @serviceBeginCallEventArgs.DaemonName, @serviceBeginCallEventArgs.Id, @serviceBeginCallEventArgs.QueuedProcesses.ToString(NumberFormatInfo.InvariantInfo)); }