public ExecutionInfo(string name, BuildStatusEventArgs startedArgs, BuildStatusEventArgs finishedArgs) { this.Name = name; this.StartedArgs = startedArgs; this.FinishedArgs = finishedArgs; this.TimeSpent = finishedArgs.Timestamp.Subtract(startedArgs.Timestamp); }
private void OnStatusEventRaised(object sender, BuildStatusEventArgs eventArgs) { }
void StatusEventRaised(object sender, BuildStatusEventArgs e) { }
/// <summary> /// Handle a status event /// </summary> /// <param name="sender">Who sent the event</param> /// <param name="e">Event raised on the event source</param> private void Source_StatusEventRaised(object sender, BuildStatusEventArgs e) { _enteredStatusEventHandler = true; _raisedStatusEvent = e; if (_exceptionInHandlers != null) { throw _exceptionInHandlers; } }
/// <summary> /// Raises a catch-all build status event to all registered loggers. /// </summary> /// <param name="sender">sender of the event</param> /// <param name="buildEvent">BuildStatusEventArgs</param> /// <exception cref="LoggerException">When EventHandler raises an logger exception the LoggerException is rethrown</exception> /// <exception cref="InternalLoggerException">Any exceptions which are not LoggerExceptions are wrapped in an InternalLoggerException</exception> /// <exception cref="Exception">ExceptionHandling.IsCriticalException exceptions will not be wrapped</exception> private void RaiseStatusEvent(object sender, BuildStatusEventArgs buildEvent) { if (StatusEventRaised != null) { try { StatusEventRaised(sender, buildEvent); } catch (LoggerException) { // if a logger has failed politely, abort immediately // first unregister all loggers, since other loggers may receive remaining events in unexpected orderings // if a fellow logger is throwing in an event handler. this.UnregisterAllEventHandlers(); throw; } catch (Exception exception) { // first unregister all loggers, since other loggers may receive remaining events in unexpected orderings // if a fellow logger is throwing in an event handler. this.UnregisterAllEventHandlers(); if (ExceptionHandling.IsCriticalException(exception)) { throw; } InternalLoggerException.Throw(exception, buildEvent, "FatalErrorWhileLogging", false); } } RaiseAnyEvent(sender, buildEvent); }
/// <summary> /// Raises a status event, optionally cascading to an any event. /// </summary> internal void RaiseStatusEvent(object sender, BuildStatusEventArgs buildEvent, bool cascade) { lock (_syncLock) { // If the event does not have the submissionId for our loggers then drop it. if (buildEvent.BuildEventContext != null && buildEvent.BuildEventContext.SubmissionId != _submissionId) { return; } if (StatusEventRaised != null) { try { StatusEventRaised(sender, buildEvent); } catch (LoggerException) { // if a logger has failed politely, abort immediately // first unregister all loggers, since other loggers may receive remaining events in unexpected orderings // if a fellow logger is throwing in an event handler. this.UnregisterAllEventHandlers(); throw; } catch (Exception) { // first unregister all loggers, since other loggers may receive remaining events in unexpected orderings // if a fellow logger is throwing in an event handler. this.UnregisterAllEventHandlers(); throw; } } if (cascade) { RaiseAnyEvent(sender, buildEvent); } } }
/// <summary> /// Raises a catch-all build status event to all registered loggers. /// </summary> /// <param name="sender">sender of the event</param> /// <param name="buildEvent">BuildStatusEventArgs</param> internal void RaiseStatusEvent(object sender, BuildStatusEventArgs buildEvent) { RaiseStatusEvent(sender, buildEvent, false); }
void StatusEventRaised(object sender, BuildStatusEventArgs e) { this.Log().Debug("{0}", e.Message); }
void eventSource_StatusEventRaised(object sender, BuildStatusEventArgs e) { EventRaised(e.Message); }
private void eventSource_StatusEventRaised(object sender, BuildStatusEventArgs e) { sw.Write(e.Message); Console.WriteLine(e.Message); }
private void eventSource_StatusEventRaised(object sender, Microsoft.Build.Framework.BuildStatusEventArgs e) { textBox.Text += Environment.NewLine + "Status Event"; }
void eventSource_StatusEventRaised(object sender, BuildStatusEventArgs e) { //WriteLineWithSenderAndMessage(String.Empty, e); }
void eventSource_StatusEventRaised_add(object sender, BuildStatusEventArgs e) { AddMessage(sender, e, MessageType.StatusEventRaised); }
private void eventSource_StatusEventRaised(object sender, Microsoft.Build.Framework.BuildStatusEventArgs e) { this.AddNode(e.Message); }
public BuildMessage(BuildStatusEventArgs args) { EventType = args.GetType().Name.Replace("EventArgs", ""); Message = args.Message; HelpKeyword = args.HelpKeyword; SenderName = args.SenderName; Timestamp = args.Timestamp; ThreadId = args.ThreadId; }
void PushEvent (BuildStatusEventArgs args) { events.Add (args); current_events_string = null; }
private void eventSource_StatusEventRaised(object sender, BuildStatusEventArgs e) { if (stop) { return; } Execute(new BuildMessage(e)); if (stop) { KillThyself(); } }
void StatusEvent(object sender, BuildStatusEventArgs e) { writer.AppendLine(GetLogMessage("StatusEvent", e)); }