예제 #1
0
        /// <summary>
        /// Generates a hash code.
        /// </summary>
        /// <returns>Hash code based on stored data.</returns>
        public override int GetHashCode()
        {
            var hashCode =
                PrecursorMz.GetHashCode() ^
                PrecursorChargeState.GetHashCode() ^
                Scan.GetHashCode() ^
                Id.GetHashCode() ^
                GroupId.GetHashCode() ^
                TotalIonCurrent.GetHashCode() ^
                RetentionTime.GetHashCode();

            return(hashCode);
        }
예제 #2
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);
     }
 }