< Summary

Information
Class: IceRpc.Transports.TransportAddress
Assembly: IceRpc
File(s): /home/runner/work/icerpc-csharp/icerpc-csharp/src/IceRpc/Transports/TransportAddress.cs
Tag: 1321_24790053727
Line coverage
100%
Covered lines: 6
Uncovered lines: 0
Coverable lines: 6
Total lines: 30
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage
100%
Covered methods: 5
Fully covered methods: 5
Total methods: 5
Method coverage: 100%
Full method coverage: 100%

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_Host()100%11100%
get_Port()100%11100%
get_TransportName()100%11100%
get_Params()100%11100%
.ctor()100%11100%

File(s)

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

#LineLine coverage
 1// Copyright (c) ZeroC, Inc.
 2
 3using System.Collections.Immutable;
 4
 5namespace IceRpc.Transports;
 6
 7/// <summary>Represents a transport address with the host and port to connect to or listen on.</summary>
 8public readonly record struct TransportAddress
 9{
 10    /// <summary>Gets or initializes the host.</summary>
 11    /// <value>The host name or IP address.</value>
 268012    public required string Host { get; init; }
 13
 14    /// <summary>Gets or initializes the port number.</summary>
 15    /// <value>The port number.</value>
 281916    public ushort Port { get; init; }
 17
 18    /// <summary>Gets or initializes the transport name.</summary>
 19    /// <value>The transport name (e.g., "tcp", "ssl", "quic"), or <see langword="null" /> if unspecified.</value>
 204920    public string? TransportName { get; init; }
 21
 22    /// <summary>Gets or initializes the transport-specific parameters.</summary>
 23    /// <value>The transport parameters. Defaults to an empty dictionary.</value>
 272724    public ImmutableDictionary<string, string> Params { get; init; } = [];
 25
 26    /// <summary>Constructs a transport address.</summary>
 27    public TransportAddress()
 90128    {
 90129    }
 30}