Пример #1
0
        void PopEvent <T> (T finished_args) where T : BuildStatusEventArgs
        {
            if (events.Count == 0)
            {
                throw new InvalidOperationException("INTERNAL ERROR: Trying to pop from an empty events stack");
            }

            BuildEvent be = events [events.Count - 1];

            if (performanceSummary || verbosity == LoggerVerbosity.Diagnostic)
            {
                var args = be.EventArgs;
                TargetStartedEventArgs tgt_args = args as TargetStartedEventArgs;
                if (tgt_args != null)
                {
                    AddPerfInfo(tgt_args.TargetName, args.Timestamp, targetPerfTable);
                }
                else
                {
                    TaskStartedEventArgs tsk_args = args as TaskStartedEventArgs;
                    if (tsk_args != null)
                    {
                        AddPerfInfo(tsk_args.TaskName, args.Timestamp, tasksPerfTable);
                    }
                }
            }

            be.ExecuteFinishedHandler(finished_args);
            events.RemoveAt(events.Count - 1);
            current_events_string = null;
        }
Пример #2
0
        void PushEvent <T> (T args) where T : BuildStatusEventArgs
        {
            BuildEvent be = new BuildEvent {
                EventArgs = args,
                StartHandlerHasExecuted = false,
                ConsoleLogger           = this
            };

            events.Add(be);
            current_events_string = null;
        }