예제 #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);
 }
예제 #2
0
 private void OnStatusEventRaised(object sender, BuildStatusEventArgs eventArgs)
 {
 }
예제 #3
0
 void StatusEventRaised(object sender, BuildStatusEventArgs e)
 {
 }
예제 #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;
                }
            }
예제 #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);
        }
예제 #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);
                    }
                }
            }
예제 #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);
 }
예제 #8
0
 void StatusEventRaised(object sender, BuildStatusEventArgs e)
 {
     this.Log().Debug("{0}", e.Message);
 }
예제 #9
0
 void eventSource_StatusEventRaised(object sender, BuildStatusEventArgs e)
 {
     EventRaised(e.Message);
 }
예제 #10
0
 private void eventSource_StatusEventRaised(object sender, BuildStatusEventArgs e)
 {
     sw.Write(e.Message);
     Console.WriteLine(e.Message);
 }
예제 #11
0
 private void eventSource_StatusEventRaised(object sender, Microsoft.Build.Framework.BuildStatusEventArgs e)
 {
     textBox.Text += Environment.NewLine + "Status Event";
 }
예제 #12
0
 void eventSource_StatusEventRaised(object sender, BuildStatusEventArgs e)
 {
     //WriteLineWithSenderAndMessage(String.Empty, e);
 }
예제 #13
0
 void eventSource_StatusEventRaised_add(object sender, BuildStatusEventArgs e)
 {
     AddMessage(sender, e, MessageType.StatusEventRaised);
 }
예제 #14
0
 private void eventSource_StatusEventRaised(object sender, Microsoft.Build.Framework.BuildStatusEventArgs e)
 {
     this.AddNode(e.Message);
 }
예제 #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;
 }
예제 #16
0
		void PushEvent (BuildStatusEventArgs args)
		{
			events.Add (args);
			current_events_string = null;
		}
예제 #17
0
 private void eventSource_StatusEventRaised(object sender, BuildStatusEventArgs e)
 {
     if (stop) {
         return;
     }
     Execute(new BuildMessage(e));
     if (stop) {
         KillThyself();
     }
 }
예제 #18
0
 void StatusEvent(object sender, BuildStatusEventArgs e) { writer.AppendLine(GetLogMessage("StatusEvent", e)); }