< Summary

Information
Class: IceRpc.Transports.IMultiplexedClientTransport
Assembly: IceRpc
File(s): /home/runner/work/icerpc-csharp/icerpc-csharp/src/IceRpc/Transports/IMultiplexedClientTransport.cs
Tag: 592_20856082467
Line coverage
66%
Covered lines: 8
Uncovered lines: 4
Coverable lines: 12
Total lines: 51
Line coverage: 66.6%
Branch coverage
50%
Covered branches: 4
Total branches: 8
Branch coverage: 50%
Method coverage
100%
Covered methods: 2
Total methods: 2
Method coverage: 100%

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_Default()50%11.08863.63%
.cctor()100%11100%

File(s)

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

#LineLine coverage
 1// Copyright (c) ZeroC, Inc.
 2
 3using IceRpc.Transports.Quic;
 4using System.Net.Quic;
 5using System.Net.Security;
 6using System.Runtime.Versioning;
 7
 8namespace IceRpc.Transports;
 9
 10/// <summary>A class to create outgoing multiplexed connections.</summary>
 11public interface IMultiplexedClientTransport
 12{
 13    /// <summary>Gets the default multiplexed client transport.</summary>
 14    /// <value>The default multiplexed client transport is the <see cref="QuicClientTransport" />.</value>
 15    public static IMultiplexedClientTransport Default
 16    {
 17        get
 1518        {
 1519            if (OperatingSystem.IsLinux() || OperatingSystem.IsMacOS() || OperatingSystem.IsWindows())
 1520            {
 1521                if (QuicConnection.IsSupported)
 1522                {
 1523                    return _quicClientTransport;
 24                }
 025                throw new NotSupportedException(
 026                    "The default QUIC client transport is not available on this system. Please review the Platform Depen
 27            }
 028            throw new PlatformNotSupportedException(
 029                "The default QUIC client transport is not supported on this platform.");
 1530        }
 31    }
 32
 33    [SupportedOSPlatform("linux")]
 34    [SupportedOSPlatform("macos")]
 35    [SupportedOSPlatform("windows")]
 436    private static readonly QuicClientTransport _quicClientTransport = new();
 37
 38    /// <summary>Gets the transport's name.</summary>
 39    string Name { get; }
 40
 41    /// <summary>Creates a new transport connection to the specified server address.</summary>
 42    /// <param name="serverAddress">The server address of the connection.</param>
 43    /// <param name="options">The multiplexed connection options.</param>
 44    /// <param name="clientAuthenticationOptions">The SSL client authentication options.</param>
 45    /// <returns>The new transport connection. This connection is not yet connected.</returns>
 46    /// <remarks>The IceRPC core can call this method concurrently so it must be thread-safe.</remarks>
 47    IMultiplexedConnection CreateConnection(
 48        ServerAddress serverAddress,
 49        MultiplexedConnectionOptions options,
 50        SslClientAuthenticationOptions? clientAuthenticationOptions);
 51}

Methods/Properties

get_Default()
.cctor()