< 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: 592_20856082467
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/>
 2112    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>
 35620    public SlicClientTransport(SlicTransportOptions options, IDuplexClientTransport duplexClientTransport)
 35621    {
 35622        _duplexClientTransport = duplexClientTransport;
 35623        _slicTransportOptions = options;
 35624    }
 25
 26    /// <summary>Constructs a Slic client transport.</summary>
 27    /// <param name="duplexClientTransport">The duplex client transport.</param>
 28    public SlicClientTransport(IDuplexClientTransport duplexClientTransport)
 4129        : this(new SlicTransportOptions(), duplexClientTransport)
 4130    {
 4131    }
 32
 33    /// <inheritdoc/>
 34    public IMultiplexedConnection CreateConnection(
 35        ServerAddress serverAddress,
 36        MultiplexedConnectionOptions options,
 37        SslClientAuthenticationOptions? clientAuthenticationOptions) =>
 35638        new SlicConnection(
 35639            _duplexClientTransport.CreateConnection(
 35640                serverAddress,
 35641                new DuplexConnectionOptions
 35642                {
 35643                    MinSegmentSize = options.MinSegmentSize,
 35644                    Pool = options.Pool
 35645                },
 35646                clientAuthenticationOptions),
 35647            options,
 35648            _slicTransportOptions,
 35649            isServer: false);
 50}