< 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: 1856_27024993493
Line coverage
100%
Covered lines: 22
Uncovered lines: 0
Coverable lines: 22
Total lines: 53
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_DefaultName()100%11100%
IsSslRequired(...)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/>
 2412    public string DefaultName => _duplexClientTransport.DefaultName;
 13
 14    /// <inheritdoc/>
 7115    public bool IsSslRequired(string? transportName) => _duplexClientTransport.IsSslRequired(transportName);
 16
 17    private readonly IDuplexClientTransport _duplexClientTransport;
 18    private readonly SlicTransportOptions _slicTransportOptions;
 19
 20    /// <summary>Constructs a Slic client transport.</summary>
 21    /// <param name="options">The options to configure the Slic transport.</param>
 22    /// <param name="duplexClientTransport">The duplex client transport.</param>
 37923    public SlicClientTransport(SlicTransportOptions options, IDuplexClientTransport duplexClientTransport)
 37924    {
 37925        _duplexClientTransport = duplexClientTransport;
 37926        _slicTransportOptions = options;
 37927    }
 28
 29    /// <summary>Constructs a Slic client transport.</summary>
 30    /// <param name="duplexClientTransport">The duplex client transport.</param>
 31    public SlicClientTransport(IDuplexClientTransport duplexClientTransport)
 4532        : this(new SlicTransportOptions(), duplexClientTransport)
 4533    {
 4534    }
 35
 36    /// <inheritdoc/>
 37    public IMultiplexedConnection CreateConnection(
 38        TransportAddress transportAddress,
 39        MultiplexedConnectionOptions options,
 40        SslClientAuthenticationOptions? clientAuthenticationOptions) =>
 37941        new SlicConnection(
 37942            _duplexClientTransport.CreateConnection(
 37943                transportAddress,
 37944                new DuplexConnectionOptions
 37945                {
 37946                    MinSegmentSize = options.MinSegmentSize,
 37947                    Pool = options.Pool
 37948                },
 37949                clientAuthenticationOptions),
 37950            options,
 37951            _slicTransportOptions,
 37952            isServer: false);
 53}