< Summary

Information
Class: System.Net.Http.HttpConnectionHandler
Assembly: System.Net.Http
File(s): D:\runner\runtime\src\libraries\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\HttpConnectionHandler.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 16
Coverable lines: 16
Total lines: 36
Line coverage: 0%
Branch coverage
0%
Covered branches: 0
Total branches: 4
Branch coverage: 0%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Cyclomatic complexity NPath complexity Sequence coverage
.ctor(...)100%110%
SendAsync(...)0%220%
Dispose(...)0%220%

File(s)

D:\runner\runtime\src\libraries\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\HttpConnectionHandler.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
 4using System.Threading;
 5using System.Threading.Tasks;
 6
 7namespace System.Net.Http
 8{
 9    internal sealed class HttpConnectionHandler : HttpMessageHandlerStage
 10    {
 11        private readonly HttpConnectionPoolManager _poolManager;
 12        private readonly bool _doRequestAuth;
 13
 014        public HttpConnectionHandler(HttpConnectionPoolManager poolManager, bool doRequestAuth)
 015        {
 016            _poolManager = poolManager;
 017            _doRequestAuth = doRequestAuth;
 018        }
 19
 20        internal override ValueTask<HttpResponseMessage> SendAsync(HttpRequestMessage request, bool async, CancellationT
 021        {
 022            bool doRequestAuth = _doRequestAuth && !request.IsAuthDisabled();
 023            return _poolManager.SendAsync(request, async, doRequestAuth, cancellationToken);
 024        }
 25
 26        protected override void Dispose(bool disposing)
 027        {
 028            if (disposing)
 029            {
 030                _poolManager.Dispose();
 031            }
 32
 033            base.Dispose(disposing);
 034        }
 35    }
 36}