< Summary

Information
Class: IceRpc.Transports.Slic.SlicClientTransport
Assembly: IceRpc
File(s): /home/runner/work/icerpc-csharp/icerpc-csharp/src/IceRpc/Transports/Slic/SlicClientTransport.cs
Tag: 275_13775359185
Line coverage
100%
Covered lines: 21
Uncovered lines: 0
Coverable lines: 21
Total lines: 50
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_Name()100%11100%
.ctor(...)100%11100%
.ctor(...)100%11100%
CreateConnection(...)100%11100%

File(s)

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

#LineLine coverage
 1// Copyright (c) ZeroC, Inc.
 2
 3using IceRpc.Transports.Slic.Internal;
 4using System.Net.Security;
 5
 6namespace IceRpc.Transports.Slic;
 7
 8/// <summary>Implements <see cref="IMultiplexedClientTransport" /> using Slic over a duplex client transport.</summary>
 9public class SlicClientTransport : IMultiplexedClientTransport
 10{
 11    /// <inheritdoc/>
 5012    public string Name => _duplexClientTransport.Name;
 13
 14    private readonly IDuplexClientTransport _duplexClientTransport;
 15    private readonly SlicTransportOptions _slicTransportOptions;
 16
 17    /// <summary>Constructs a Slic client transport.</summary>
 18    /// <param name="options">The options to configure the Slic transport.</param>
 19    /// <param name="duplexClientTransport">The duplex client transport.</param>
 68620    public SlicClientTransport(SlicTransportOptions options, IDuplexClientTransport duplexClientTransport)
 68621    {
 68622        _duplexClientTransport = duplexClientTransport;
 68623        _slicTransportOptions = options;
 68624    }
 25
 26    /// <summary>Constructs a Slic client transport.</summary>
 27    /// <param name="duplexClientTransport">The duplex client transport.</param>
 28    public SlicClientTransport(IDuplexClientTransport duplexClientTransport)
 6729        : this(new SlicTransportOptions(), duplexClientTransport)
 6730    {
 6731    }
 32
 33    /// <inheritdoc/>
 34    public IMultiplexedConnection CreateConnection(
 35        ServerAddress serverAddress,
 36        MultiplexedConnectionOptions options,
 37        SslClientAuthenticationOptions? clientAuthenticationOptions) =>
 69838        new SlicConnection(
 69839            _duplexClientTransport.CreateConnection(
 69840                serverAddress,
 69841                new DuplexConnectionOptions
 69842                {
 69843                    MinSegmentSize = options.MinSegmentSize,
 69844                    Pool = options.Pool
 69845                },
 69846                clientAuthenticationOptions),
 69847            options,
 69848            _slicTransportOptions,
 69849            isServer: false);
 50}