< Summary - SonghayCore

Information
Class: Songhay.Extensions.XNamespaceExtensions
Assembly: SonghayCore
File(s): /home/rasx/sourceRoot/SonghayCore/SonghayCore/Extensions/XNamespaceExtensions.cs
Line coverage
100%
Covered lines: 5
Uncovered lines: 0
Coverable lines: 5
Total lines: 19
Line coverage: 100%
Branch coverage
50%
Covered branches: 2
Total branches: 4
Branch coverage: 50%
Method coverage

Method coverage is only available for sponsors.

Upgrade to PRO version

Metrics

MethodBranch coverage Cyclomatic complexity Line coverage
ToXName(...)50%4100%

File(s)

/home/rasx/sourceRoot/SonghayCore/SonghayCore/Extensions/XNamespaceExtensions.cs

#LineLine coverage
 1namespace Songhay.Extensions;
 2
 3/// <summary>
 4/// Extensions of <see cref="XNamespace"/>
 5/// </summary>
 6public static class XNamespaceExtensions
 7{
 8    /// <summary>
 9    /// Converts the <see cref="XNamespace"/> to an <see cref="XName"/>
 10    /// with the specified element name.
 11    /// </summary>
 12    /// <param name="ns">The ns.</param>
 13    /// <param name="elementName">Name of the element.</param>
 1717614    public static XName? ToXName(this XNamespace? ns, string? elementName) => string.IsNullOrWhiteSpace(elementName)
 1717615        ? null
 1717616        : ns == null
 1717617            ? elementName
 1717618            : ns + elementName;
 19}