public int CompareTo(object obj) { if (obj == null) { return(1); } var other = obj as OptimizationKey; if (other == null) { throw new ArgumentException(Resources.OptimizationKey_CompareTo_Cannot_compare_OptimizationKey_to_an_object_of_a_different_type); } else if (!Equals(OptType, other.OptType)) { return(OptType.CompareTo(other.OptType)); } else if (!Equals(PeptideModSeq, other.PeptideModSeq)) { return(PeptideModSeq.CompareTo(other.PeptideModSeq)); } else if (!PrecursorAdduct.Equals(other.PrecursorAdduct)) { return(PrecursorAdduct.CompareTo(other.PrecursorAdduct)); } else if (FragmentIon != other.FragmentIon) { return(String.Compare(FragmentIon, other.FragmentIon, StringComparison.InvariantCulture)); } else { return(ProductAdduct.CompareTo(other.ProductAdduct)); } }
public override int GetHashCode() { unchecked { int result = base.GetHashCode(); result = (result * 397) ^ (PeptideModSeq != null ? PeptideModSeq.GetHashCode() : 0); result = (result * 397) ^ CollisionalCrossSection.GetHashCode(); result = (result * 397) ^ HighEnergyDriftTimeOffsetMsec.GetHashCode(); return(result); } }
public override int GetHashCode() { unchecked { int result = base.GetHashCode(); result = (result * 397) ^ (PeptideModSeq != null ? PeptideModSeq.GetHashCode() : 0); result = (result * 397) ^ Irt.GetHashCode(); result = (result * 397) ^ Standard.GetHashCode(); result = (result * 397) ^ (TimeSource.HasValue ? TimeSource.Value : 0); return(result); } }
public override int GetHashCode() { unchecked { int result = (PeptideModSeq != null ? PeptideModSeq.GetHashCode() : 0); result = (result * 397) ^ OptType.GetHashCode(); result = (result * 397) ^ PrecursorAdduct.GetHashCode(); if (FragmentIon != null) { result = (result * 397) ^ FragmentIon.GetHashCode(); } result = (result * 397) ^ ProductAdduct.GetHashCode(); return(result); } }