< Summary

Information
Class: IceRpc.Transports.Tcp.Internal.IOExceptionExtensions
Assembly: IceRpc
File(s): /home/runner/work/icerpc-csharp/icerpc-csharp/src/IceRpc/Transports/Tcp/Internal/IOExceptionExtensions.cs
Tag: 275_13775359185
Line coverage
100%
Covered lines: 3
Uncovered lines: 0
Coverable lines: 3
Total lines: 14
Line coverage: 100%
Branch coverage
50%
Covered branches: 1
Total branches: 2
Branch coverage: 50%
Method coverage
100%
Covered methods: 1
Total methods: 1
Method coverage: 100%

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
ToIceRpcException(...)50%22100%

File(s)

/home/runner/work/icerpc-csharp/icerpc-csharp/src/IceRpc/Transports/Tcp/Internal/IOExceptionExtensions.cs

#LineLine coverage
 1// Copyright (c) ZeroC, Inc.
 2
 3using System.Net.Sockets;
 4
 5namespace IceRpc.Transports.Tcp.Internal;
 6
 7internal static class IOExceptionExtensions
 8{
 9    /// <summary>Converts an IOException into an <see cref="IceRpcException" />.</summary>
 10    internal static IceRpcException ToIceRpcException(this IOException exception) =>
 2011        exception.InnerException is SocketException socketException ?
 2012            socketException.ToIceRpcException(exception) :
 2013            new IceRpcException(IceRpcError.IceRpcError, exception);
 14}