< Summary

Information
Class: IceRpc.Transports.TransportConnectionInformation
Assembly: IceRpc
File(s): /home/runner/work/icerpc-csharp/icerpc-csharp/src/IceRpc/Transports/TransportConnectionInformation.cs
Tag: 275_13775359185
Line coverage
100%
Covered lines: 12
Uncovered lines: 0
Coverable lines: 12
Total lines: 36
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage
100%
Covered methods: 4
Total methods: 4
Method coverage: 100%

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_LocalNetworkAddress()100%11100%
get_RemoteNetworkAddress()100%11100%
get_RemoteCertificate()100%11100%
.ctor(...)100%11100%

File(s)

/home/runner/work/icerpc-csharp/icerpc-csharp/src/IceRpc/Transports/TransportConnectionInformation.cs

#LineLine coverage
 1// Copyright (c) ZeroC, Inc.
 2
 3using System.Net;
 4using System.Security.Cryptography.X509Certificates;
 5
 6namespace IceRpc.Transports;
 7
 8/// <summary>The transport connection information returned on connection establishment.</summary>
 9public sealed record class TransportConnectionInformation
 10{
 11    /// <summary>Gets the network address of the local end of the connection.</summary>
 12    /// <value>The local network address.</value>
 11313    public EndPoint LocalNetworkAddress { get; }
 14
 15    /// <summary>Gets the network address of the remote end of the connection.</summary>
 16    /// <value>The remote network address.</value>
 10717    public EndPoint RemoteNetworkAddress { get; }
 18
 19    /// <summary>Gets the certificate of the peer, if provided.</summary>
 20    /// <value>The certificate of the peer or <see langword="null" /> if the peer didn't provide one.</value>
 621    public X509Certificate? RemoteCertificate { get; }
 22
 23    /// <summary>Constructs a new instance of <see cref="TransportConnectionInformation" />.</summary>
 24    /// <param name="localNetworkAddress">The local network address.</param>
 25    /// <param name="remoteNetworkAddress">The remote network address.</param>
 26    /// <param name="remoteCertificate">The remote certificate.</param>
 254927    public TransportConnectionInformation(
 254928        EndPoint localNetworkAddress,
 254929        EndPoint remoteNetworkAddress,
 254930        X509Certificate? remoteCertificate)
 254931    {
 254932        LocalNetworkAddress = localNetworkAddress;
 254933        RemoteNetworkAddress = remoteNetworkAddress;
 254934        RemoteCertificate = remoteCertificate;
 254935    }
 36}