< Summary

Information
Class: System.Net.TcpValidationHelpers
Assembly: System.Net.Primitives
File(s): D:\runner\runtime\src\libraries\Common\src\System\Net\TcpValidationHelpers.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 3
Coverable lines: 3
Total lines: 15
Line coverage: 0%
Branch coverage
0%
Covered branches: 0
Total branches: 2
Branch coverage: 0%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Cyclomatic complexity NPath complexity Sequence coverage
ValidatePortNumber(...)0%220%

File(s)

D:\runner\runtime\src\libraries\Common\src\System\Net\TcpValidationHelpers.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 System.Net
 5{
 6    internal static class TcpValidationHelpers
 7    {
 8        public static bool ValidatePortNumber(int port)
 09        {
 10            // When this method returns false, the caller should throw
 11            // 'new ArgumentOutOfRangeException("port")'
 012            return port >= IPEndPoint.MinPort && port <= IPEndPoint.MaxPort;
 013        }
 14    }
 15}