< Summary - CoreWCF Coverage — PR #1766

Information
Class: CoreWCF.Xml.XmlConverter
Assembly: CoreWCF.Primitives
File(s): /home/runner/work/CoreWCF/CoreWCF/src/CoreWCF.Primitives/src/CoreWCF/Xml/XmlConverter.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 5
Coverable lines: 5
Total lines: 24
Line coverage: 0%
Branch coverage
0%
Covered branches: 0
Total branches: 12
Branch coverage: 0%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Cyclomatic complexity NPath complexity Sequence coverage
IsWhitespace(...)0%880%
IsWhitespace(...)0%440%

File(s)

/home/runner/work/CoreWCF/CoreWCF/src/CoreWCF.Primitives/src/CoreWCF/Xml/XmlConverter.cs

#LineLine coverage
 1// Licensed to the .NET Foundation under one or more agreements.
 2// The .NET Foundation licenses this file to you under the MIT license.
 3
 4namespace CoreWCF.Xml
 5{
 6    internal static class XmlConverter
 7    {
 8        public static bool IsWhitespace(char ch)
 9        {
 010            return (ch <= ' ' && (ch == ' ' || ch == '\t' || ch == '\r' || ch == '\n'));
 11        }
 12
 13        public static bool IsWhitespace(string s)
 14        {
 015            for (int i = 0; i < s.Length; i++)
 16            {
 017                if (!IsWhitespace(s[i]))
 018                    return false;
 19            }
 20
 021            return true;
 22        }
 23    }
 24}