Tmx.Core.TestResultsExporter.CreateTestResultDetailsXElement C# (CSharp) Method

CreateTestResultDetailsXElement() public method

public CreateTestResultDetailsXElement ( ITestResult testResult, IXMLElementsStruct xmlStruct ) : System.Xml.Linq.XElement
testResult ITestResult
xmlStruct IXMLElementsStruct
return System.Xml.Linq.XElement
        public XElement CreateTestResultDetailsXElement(
                ITestResult testResult,
                IXMLElementsStruct xmlStruct)
        {
            if (0 == testResult.Details.Count) {
                return null;
            }

            var testResultDetailsElement =
                new XElement("details",
                             from testResultDetail in testResult.Details
                             select new XElement("detail", 
                                                 CreateXattribute("name", testResultDetail.Name),
                                                 CreateXattribute(xmlStruct.TimeSpentAttribute, testResultDetail.Timestamp),
                                                 CreateXattribute("status", testResultDetail.DetailStatus)
                                                )
                            );

            return testResultDetailsElement;
        }