public override int GetHashCode() { unchecked { var hashCode = (int)LipidClass; hashCode = (hashCode * 397) ^ (int)LipidType; hashCode = (hashCode * 397) ^ (FragmentDescription != null ? FragmentDescription.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (int)FragmentationMode; hashCode = (hashCode * 397) ^ (int)FragmentationType; hashCode = (hashCode * 397) ^ IntensityMax.GetHashCode(); return(hashCode); } }
public int CompareTo(ScoreModelUnit other) { if (!LipidClass.Equals(other.LipidClass)) { return(LipidClass.CompareTo(other.LipidClass)); } if (!LipidType.Equals(other.LipidType)) { return(LipidType.CompareTo(other.LipidType)); } if (!FragmentDescription.Equals(other.FragmentDescription)) { return(String.Compare(FragmentDescription, other.FragmentDescription, StringComparison.Ordinal)); } if (!FragmentationMode.Equals(other.FragmentationMode)) { return(FragmentationMode.CompareTo(other.FragmentationMode)); } if (!FragmentationType.Equals(other.FragmentationType)) { return(FragmentationType.CompareTo(other.FragmentationType)); } return(IntensityMax.CompareTo(other.IntensityMax)); }
protected bool Equals(ScoreModelUnit other) { return(LipidClass == other.LipidClass && LipidType == other.LipidType && string.Equals(FragmentDescription, other.FragmentDescription) && FragmentationMode == other.FragmentationMode && FragmentationType == other.FragmentationType && IntensityMax.Equals(other.IntensityMax)); }