Beispiel #1
0
 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;
         return(hashCode);
     }
 }
Beispiel #2
0
 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));
 }
Beispiel #3
0
        public int CompareTo(SpecificFragment 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));
            }

            return(FragmentationType.CompareTo(other.FragmentationType));
        }