Ejemplo n.º 1
0
        public override bool Equals(object obj)
        {
            var rhs = obj as NodeInfo;

            if (rhs != null)
            {
                return
                    (Identifier.Equals(rhs.Identifier) &&
                     RoutingHash.Equals(rhs.RoutingHash) &&
                     HostAndPort.Equals(rhs.HostAndPort));
            }
            return(false);
        }
Ejemplo n.º 2
0
 public int CompareTo(NodeInfo other)
 {
     return
         (RoutingHash < other.RoutingHash?-1:
          RoutingHash.Equals(other.RoutingHash)?0:1);
 }
Ejemplo n.º 3
0
 public override int GetHashCode()
 {
     return(Identifier.GetHashCode() ^ RoutingHash.GetHashCode() ^ HostAndPort.GetHashCode());
 }