Пример #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)); }