/// <summary> /// Returns a hash code that takes into account the name and host. /// </summary> public override int GetHashCode() { // Note that we need to Lower since we have it in equals because any thing for which // we equals returns true the Hash code should be the same. return(HostAddress.ValueOrDefault(address => address.ToLower().GetHashCode()) ^ Name.ValueOrDefault(name => name.ToLower().GetHashCode())); }
/// <summary> /// Returns a hash code that takes into account the host address. /// </summary> public override int GetHashCode() { return(HostAddress.ValueOrDefault(GetHashCode)); }