public override bool Equals(object obj)
        {
            if (!(obj is SniConnectionEndPoint point))
            {
                return(false);
            }

            if (_hostIpEndPoint != null)
            {
                if (point._hostIpEndPoint == null || !_hostIpEndPoint.Equals(point._hostIpEndPoint))
                {
                    return(false);
                }
            }
            else if (point._hostIpEndPoint != null)
            {
                return(false);
            }

            return(_serverName == point._serverName && SocketIpEndPoint.Equals(point.SocketIpEndPoint));
        }
 public bool Equals(IConnectionEndPoint other)
 {
     return(SocketIpEndPoint.Equals(other.SocketIpEndPoint));
 }
示例#3
0
 public override int GetHashCode()
 {
     return(SocketIpEndPoint.GetHashCode());
 }
示例#4
0
 /// <inheritdoc />
 public override bool Equals(object obj)
 {
     return(obj is ConnectionEndPoint endpoint &&
            SocketIpEndPoint.Equals(endpoint.SocketIpEndPoint));
 }