< Summary

Line coverage
0%
Covered lines: 0
Uncovered lines: 9
Coverable lines: 9
Total lines: 32
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
File 1: .cctor()100%110%
File 2: ConstructSystemProxy()0%220%

File(s)

D:\runner\runtime\src\libraries\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\SystemProxyInfo.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.Http
 5{
 6    internal static partial class SystemProxyInfo
 7    {
 08        public static IWebProxy Proxy => s_proxy.Value;
 9
 010        private static readonly Lazy<IWebProxy> s_proxy = new Lazy<IWebProxy>(ConstructSystemProxy);
 11    }
 12}

D:\runner\runtime\src\libraries\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\SystemProxyInfo.Windows.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.Http
 5{
 6    internal static partial class SystemProxyInfo
 7    {
 8        // On Windows we get default proxy configuration from either environment variables or the Windows system proxy.
 9        public static IWebProxy ConstructSystemProxy()
 010        {
 011            if (!HttpEnvironmentProxy.TryCreate(out IWebProxy? proxy))
 012            {
 13                // We create instance even if there is currently no proxy as that can change during application run.
 014                proxy = new HttpWindowsProxy();
 015            }
 16
 017            return proxy;
 018        }
 19    }
 20}