< Summary

Information
Class: Ice.Internal.WSConnector
Assembly: Ice
File(s): /home/runner/work/ice/ice/csharp/src/Ice/Internal/WSConnector.cs
Tag: 71_18251537082
Line coverage
80%
Covered lines: 16
Uncovered lines: 4
Coverable lines: 20
Total lines: 53
Line coverage: 80%
Branch coverage
62%
Covered branches: 5
Total branches: 8
Branch coverage: 62.5%
Method coverage
83%
Covered methods: 5
Total methods: 6
Method coverage: 83.3%

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
connect()100%11100%
type()100%210%
.ctor(...)100%11100%
Equals(...)62.5%9.73870%
ToString()100%11100%
GetHashCode()100%11100%

File(s)

/home/runner/work/ice/ice/csharp/src/Ice/Internal/WSConnector.cs

#LineLine coverage
 1// Copyright (c) ZeroC, Inc.
 2
 3namespace Ice.Internal;
 4
 5internal sealed class WSConnector : Connector
 6{
 17    public Transceiver connect() => new WSTransceiver(_instance, _delegate.connect(), _host, _resource);
 8
 09    public short type() => _delegate.type();
 10
 111    internal WSConnector(ProtocolInstance instance, Connector del, string host, string resource)
 12    {
 113        _instance = instance;
 114        _delegate = del;
 115        _host = host;
 116        _resource = resource;
 117    }
 18
 19    public override bool Equals(object obj)
 20    {
 121        if (!(obj is WSConnector))
 22        {
 023            return false;
 24        }
 25
 126        if (this == obj)
 27        {
 128            return true;
 29        }
 30
 131        var p = (WSConnector)obj;
 132        if (!_delegate.Equals(p._delegate))
 33        {
 034            return false;
 35        }
 36
 137        if (!_resource.Equals(p._resource, StringComparison.Ordinal))
 38        {
 039            return false;
 40        }
 41
 142        return true;
 43    }
 44
 145    public override string ToString() => _delegate.ToString();
 46
 147    public override int GetHashCode() => _delegate.GetHashCode();
 48
 49    private readonly ProtocolInstance _instance;
 50    private readonly Connector _delegate;
 51    private readonly string _host;
 52    private readonly string _resource;
 53}