示例#1
0
        protected override void OnWriteLogObject(object logObject)
        {
            switch (logObject)
            {
            case BuildSessionStartedEvent pspe:
                if (File.Exists(pspe.LogFile))
                {
                    binlogSessions [pspe.SessionId] = pspe.LogFile;
                }
                else
                {
                    currentCustomProject = new BuildOutputProcessor(pspe.LogFile, false);
                    currentCustomProject.AddNode(BuildOutputNodeType.Project,
                                                 GettextCatalog.GetString("Custom project"),
                                                 GettextCatalog.GetString("Custom project started building"),
                                                 true, pspe.TimeStamp);
                }
                break;

            case BuildSessionFinishedEvent psfe:
                if (currentCustomProject != null)
                {
                    currentCustomProject.EndCurrentNode(null, psfe.TimeStamp);
                    BuildOutput.AddProcessor(currentCustomProject);
                    currentCustomProject = null;
                }
                else if (binlogSessions.TryGetValue(psfe.SessionId, out string logFile))
                {
                    BuildOutput.Load(logFile, true);
                    binlogSessions.Remove(psfe.SessionId);
                }
                BuildOutput.RaiseOutputChanged();
                break;
            }
        }
示例#2
0
 internal void AddProcessor(BuildOutputProcessor processor)
 {
     projects = projects.Add(processor);
 }