예제 #1
0
 public override int GetHashCode()
 {
     unchecked
     {
         int hashCode = PrecursorMz.GetHashCode();
         hashCode = (hashCode * 397) ^ ProductMz.GetHashCode();
         hashCode = (hashCode * 397) ^ Times.GetHashCode();
         hashCode = (hashCode * 397) ^ Intensities.GetHashCode();
         hashCode = (hashCode * 397) ^ Color.GetHashCode();
         return(hashCode);
     }
 }
예제 #2
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (Times != 0)
            {
                hash ^= Times.GetHashCode();
            }
            if (Gems != 0)
            {
                hash ^= Gems.GetHashCode();
            }
            return(hash);
        }
예제 #3
0
 public override int GetHashCode()
 {
     unchecked
     {
         int hashCode = (Name != null ? Name.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Label != null ? Label.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Cohort != null ? Cohort.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Sample != null ? Sample.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (PrecursorPool != null ? PrecursorPool.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ TimePoint.GetHashCode();
         hashCode = (hashCode * 397) ^ (Times != null ? Times.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (TotalIonCurrent != null ? TotalIonCurrent.GetHashCode() : 0);
         return(hashCode);
     }
 }
예제 #4
0
        /// <summary>
        /// Gets the hash code
        /// </summary>
        /// <returns>Hash code</returns>
        public override int GetHashCode()
        {
            unchecked // Overflow is fine, just wrap
            {
                var hashCode = 41;
                // Suitable nullity checks etc, of course :)
                if (ProposalId != null)
                {
                    hashCode = hashCode * 59 + ProposalId.GetHashCode();
                }
                if (Times != null)
                {
                    hashCode = hashCode * 59 + Times.GetHashCode();
                }

                hashCode = hashCode * 59 + Break.GetHashCode();
                return(hashCode);
            }
        }
 /// <summary>
 /// Gets the hash code
 /// </summary>
 /// <returns>Hash code</returns>
 public override int GetHashCode()
 {
     unchecked // Overflow is fine, just wrap
     {
         int hashCode = 41;
         if (Times != null)
         {
             hashCode = hashCode * 59 + Times.GetHashCode();
         }
         if (Distances != null)
         {
             hashCode = hashCode * 59 + Distances.GetHashCode();
         }
         if (Info != null)
         {
             hashCode = hashCode * 59 + Info.GetHashCode();
         }
         return(hashCode);
     }
 }