OctoTorrent.Client.Peer.Equals C# (CSharp) Method

Equals() public method

public Equals ( Peer other ) : bool
other Peer
return bool
        public bool Equals(Peer other)
        {
            if (other == null)
                return false;

            // FIXME: Don't compare the port, just compare the IP
            if (string.IsNullOrEmpty(PeerId) && string.IsNullOrEmpty(other.PeerId))
                return _connectionUri.Host.Equals(other._connectionUri.Host);

            return PeerId == other.PeerId;
        }

Same methods

Peer::Equals ( object obj ) : bool

Usage Example

Esempio n. 1
0
        public override bool Equals(object obj)
        {
            var id = obj as PeerId;

            return(id != null && peer.Equals(id.peer));
        }