/// <summary> /// Serves as a hash function for a particular type. /// </summary> /// <returns>A hash code for the Object.</returns> public override int GetHashCode() { int sourceArtifacyhash = SourceArtifactId.GetHashCode(); int targetArtifactHash = TargetArtifactId.GetHashCode(); int probabilityHash = Score.GetHashCode(); int hash = sourceArtifacyhash ^ targetArtifactHash ^ probabilityHash; return(hash); }
/// <summary> /// Determines whether the specified Object is equal to the current Object. /// </summary> /// <param name="obj">the other object</param> /// <returns>true if objects are equal</returns> public override bool Equals(object obj) { TLSingleLink other = obj as TLSingleLink; if (other != null) { return((SourceArtifactId.Equals(other.SourceArtifactId) && TargetArtifactId.Equals(other.TargetArtifactId)) && Score.Equals(other.Score)); } return(false); }