/// <summary> /// Object hash code /// </summary> /// <returns></returns> public override int GetHashCode() { unchecked { var hashCode = FixedMod.GetHashCode(); hashCode = (hashCode * 397) ^ MassDelta.GetHashCode(); hashCode = (hashCode * 397) ^ (Residues != null ? Residues.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (SpecificityRules != null ? SpecificityRules.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (CVParams != null ? CVParams.GetHashCode() : 0); return(hashCode); } }
/// <summary> /// Object equality /// </summary> /// <param name="other"></param> /// <returns></returns> public bool Equals(SearchModificationObj other) { if (ReferenceEquals(this, other)) { return(true); } if (other == null) { return(false); } if ((FixedMod == other.FixedMod) && MassDelta.Equals(other.MassDelta) && (Residues == other.Residues) && Equals(SpecificityRules, other.SpecificityRules) && Equals(CVParams, other.CVParams)) { return(true); } return(false); }