< Summary

Information
Class: System.Net.Http.SocketsHttpConnectionContext
Assembly: System.Net.Http
File(s): D:\runner\runtime\src\libraries\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\SocketsHttpConnectionContext.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 7
Coverable lines: 7
Total lines: 30
Line coverage: 0%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Cyclomatic complexity NPath complexity Sequence coverage
.ctor(...)100%110%

File(s)

D:\runner\runtime\src\libraries\System.Net.Http\src\System\Net\Http\SocketsHttpHandler\SocketsHttpConnectionContext.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    /// <summary>
 7    /// Represents the context passed to the ConnectCallback for a SocketsHttpHandler instance.
 8    /// </summary>
 9    public sealed class SocketsHttpConnectionContext
 10    {
 11        private readonly DnsEndPoint _dnsEndPoint;
 12        private readonly HttpRequestMessage _initialRequestMessage;
 13
 014        internal SocketsHttpConnectionContext(DnsEndPoint dnsEndPoint, HttpRequestMessage initialRequestMessage)
 015        {
 016            _dnsEndPoint = dnsEndPoint;
 017            _initialRequestMessage = initialRequestMessage;
 018        }
 19
 20        /// <summary>
 21        /// The DnsEndPoint to be used by the ConnectCallback to establish the connection.
 22        /// </summary>
 023        public DnsEndPoint DnsEndPoint => _dnsEndPoint;
 24
 25        /// <summary>
 26        /// The initial HttpRequestMessage that is causing the connection to be created.
 27        /// </summary>
 028        public HttpRequestMessage InitialRequestMessage => _initialRequestMessage;
 29    }
 30}