src/NUnit/Core/src/Api/ITestResultExtensions.cs
/// <summary>
/// Generates the XML report of <paramref name="result"/>.
/// </summary>
/// <param name="result">The test result.</param>
/// <param name="ident">Idents XML output.</param>
/// <returns>
/// The result of <see cref="IXmlNodeBuilder.AddToXml(TNode, bool)"/>
/// of <see cref="ITestResult"/>. The root node is &lt;tests/&gt;.
/// </returns>
Generates the XML report of .
Generates the XML report of .
public static string GenerateXmlReport(this ITestResult? result, bool ident = false)
        {
            var node = new TNode("tests");
            if (!(result is null)) {
                result.AddToXml(node, recursive: true);
            }
            return ident
                ? XDocument.Parse(node.OuterXml).ToString()
                : node.OuterXml;
        }
public static string GenerateXmlReport ( this ITestResult ? result , bool ident = false ) { var node = new TNode ( " " ) ; if ( ! ( result is null ) ) { result . AddToXml ( node , recursive : true ) ; } return ident ? XDocument . Parse ( node . OuterXml ) . ToString ( ) : node . OuterXml ; }
Generates the XML report of .
Generates the XML report of .
The result of
of . The root node is .
The result of of . The root node is .
ITestResult?
this
ident
bool
Idents XML output.
Idents XML output .
result
The test result.
The test result .