internal virtual bool HandleScriptFlowMessage(ScriptFlowMessage flowMessage) { bool closeThisItem = false; // Check if we have a subitem that must handle this line if (currentSubItem != null) { if (currentSubItem.HandleScriptFlowMessage(flowMessage)) { // The subItem handled the request and notified us that it must be closed currentSubItem = null; } } else { // Check if a new subItem must be created if (flowMessage.MessageType == TrFlowMessageType.Start) { currentSubItem = new TrXmlEntry(flowMessage); ReportItems.Add(currentSubItem); } else if (flowMessage.MessageType == TrFlowMessageType.End) { if ((String.IsNullOrEmpty(Type)) || (Type.StartsWith(flowMessage.TestItemType.ToString()))) { Tag = TrTestReportItemState.Finished.ToString(); EndTime = flowMessage.TimeStamp; closeThisItem = true; } } } if (flowMessage.MessageType == TrFlowMessageType.Abort) { // Always abort this item too if an abort message comes in Tag = TrTestReportItemState.Aborted.ToString(); EndTime = flowMessage.TimeStamp; closeThisItem = true; } return(closeThisItem); }
public TrXmlEntry(ScriptFlowMessage flowMessage) : this(flowMessage as ScriptMessageBase) { MainType = TafTestReportItemMainType.TestItem; }