private static void PrintTransactions(ProcessInstance process) { Console.WriteLine("-------------------------------------------------------------------------"); Console.WriteLine("----------------------------TRANSACTIONS---------------------------------"); var table = CreateDataTable(process.GetTransactions()); ConsoleTableBuilder.From(table).ExportAndWriteLine(); NextCmd(process); }
public XElement Create(ProcessInstance process) { var root = new XElement(XmlParsersConfig.ElementProcessInstance, new XAttribute(XmlParsersConfig.AttributeId, process.Id), new XAttribute(XmlParsersConfig.AttributeKindId, process.ProcessKindId), new XAttribute(XmlParsersConfig.AttributeStartTime, process.StartTime.HasValue ? process.StartTime.Value.ToString(XmlParsersConfig.DateTimeFormat) : string.Empty), new XAttribute(XmlParsersConfig.AttributeExpectedEndTime, process.ExpectedEndTime.HasValue ? process.ExpectedEndTime.Value.ToString(XmlParsersConfig.DateTimeFormat) : string.Empty)); foreach (var transaction in process.GetTransactions()) { var element = CreateTransactionElement(transaction); TreeStructureHelper.Traverse(transaction, element, (t, e) => e.Add(CreateTransactionElement(t))); root.Add(element); } return(root); }