< 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: 1321_24790053727
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/>
 2012    public string DefaultName => _duplexClientTransport.DefaultName;
 13
 14    /// <inheritdoc/>
 6515    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>
 36123    public SlicClientTransport(SlicTransportOptions options, IDuplexClientTransport duplexClientTransport)
 36124    {
 36125        _duplexClientTransport = duplexClientTransport;
 36126        _slicTransportOptions = options;
 36127    }
 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) =>
 35841        new SlicConnection(
 35842            _duplexClientTransport.CreateConnection(
 35843                transportAddress,
 35844                new DuplexConnectionOptions
 35845                {
 35846                    MinSegmentSize = options.MinSegmentSize,
 35847                    Pool = options.Pool
 35848                },
 35849                clientAuthenticationOptions),
 35850            options,
 35851            _slicTransportOptions,
 35852            isServer: false);
 53}