public override int GetHashCode() { int hashCode = MsDataFileId.GetHashCode(); hashCode = hashCode * 31 + PeptideId.GetHashCode(); hashCode = hashCode * 31 + RetentionTime.GetHashCode(); return(hashCode); }
public override int GetHashCode() { unchecked { int hashCode = (Name != null ? Name.GetHashCode() : 0); hashCode = (hashCode * 397) ^ PeptideId.GetHashCode(); hashCode = (hashCode * 397) ^ MinCharge; hashCode = (hashCode * 397) ^ (ExcludedMasses != null ? ExcludedMasses.GetHashCode() : 0); hashCode = (hashCode * 397) ^ MaxCharge; hashCode = (hashCode * 397) ^ MassAccuracy.GetHashCode(); hashCode = (hashCode * 397) ^ (FileAnalyses != null ? FileAnalyses.GetHashCode() : 0); return(hashCode); } }
public override bool Equals(object obj) { if (obj == this) { return(true); } var that = obj as SearchResultKey; if (that == null) { return(false); } return(MsDataFileId.Equals(that.MsDataFileId) && PeptideId.Equals(that.PeptideId) && RetentionTime.Equals(that.RetentionTime)); }