Ejemplo n.º 1
0
 public ExecutionInfo(string name, BuildStatusEventArgs startedArgs, BuildStatusEventArgs finishedArgs)
 {
     this.Name = name;
     this.StartedArgs = startedArgs;
     this.FinishedArgs = finishedArgs;
     this.TimeSpent = finishedArgs.Timestamp.Subtract(startedArgs.Timestamp);
 }
Ejemplo n.º 2
0
 private void OnStatusEventRaised(object sender, BuildStatusEventArgs eventArgs)
 {
 }
Ejemplo n.º 3
0
 void StatusEventRaised(object sender, BuildStatusEventArgs e)
 {
 }
Ejemplo n.º 4
0
            /// <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;
                }
            }
Ejemplo n.º 5
0
        /// <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);
        }
Ejemplo n.º 6
0
            /// <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);
                    }
                }
            }
Ejemplo n.º 7
0
 /// <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);
 }
Ejemplo n.º 8
0
 void StatusEventRaised(object sender, BuildStatusEventArgs e)
 {
     this.Log().Debug("{0}", e.Message);
 }
Ejemplo n.º 9
0
 void eventSource_StatusEventRaised(object sender, BuildStatusEventArgs e)
 {
     EventRaised(e.Message);
 }
Ejemplo n.º 10
0
 private void eventSource_StatusEventRaised(object sender, BuildStatusEventArgs e)
 {
     sw.Write(e.Message);
     Console.WriteLine(e.Message);
 }
Ejemplo n.º 11
0
 private void eventSource_StatusEventRaised(object sender, Microsoft.Build.Framework.BuildStatusEventArgs e)
 {
     textBox.Text += Environment.NewLine + "Status Event";
 }
Ejemplo n.º 12
0
 void eventSource_StatusEventRaised(object sender, BuildStatusEventArgs e)
 {
     //WriteLineWithSenderAndMessage(String.Empty, e);
 }
Ejemplo n.º 13
0
 void eventSource_StatusEventRaised_add(object sender, BuildStatusEventArgs e)
 {
     AddMessage(sender, e, MessageType.StatusEventRaised);
 }
Ejemplo n.º 14
0
 private void eventSource_StatusEventRaised(object sender, Microsoft.Build.Framework.BuildStatusEventArgs e)
 {
     this.AddNode(e.Message);
 }
Ejemplo n.º 15
0
 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;
 }
Ejemplo n.º 16
0
		void PushEvent (BuildStatusEventArgs args)
		{
			events.Add (args);
			current_events_string = null;
		}
Ejemplo n.º 17
0
 private void eventSource_StatusEventRaised(object sender, BuildStatusEventArgs e)
 {
     if (stop) {
         return;
     }
     Execute(new BuildMessage(e));
     if (stop) {
         KillThyself();
     }
 }
Ejemplo n.º 18
0
 void StatusEvent(object sender, BuildStatusEventArgs e) { writer.AppendLine(GetLogMessage("StatusEvent", e)); }