Beispiel #1
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 (BrandName != null)
         {
             hashCode = hashCode * 59 + BrandName.GetHashCode();
         }
         if (ModelName != null)
         {
             hashCode = hashCode * 59 + ModelName.GetHashCode();
         }
         if (FrameType != null)
         {
             hashCode = hashCode * 59 + FrameType.GetHashCode();
         }
         if (Description != null)
         {
             hashCode = hashCode * 59 + Description.GetHashCode();
         }
         return(hashCode);
     }
 }
Beispiel #2
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (header_ != null)
            {
                hash ^= Header.GetHashCode();
            }
            if (MeasureType != 0)
            {
                hash ^= MeasureType.GetHashCode();
            }
            if (FrameType != 0)
            {
                hash ^= FrameType.GetHashCode();
            }
            if (position_ != null)
            {
                hash ^= Position.GetHashCode();
            }
            if (velocity_ != null)
            {
                hash ^= Velocity.GetHashCode();
            }
            if (Yaw != 0D)
            {
                hash ^= Yaw.GetHashCode();
            }
            if (ZoneId != 0)
            {
                hash ^= ZoneId.GetHashCode();
            }
            if (IsHaveVariance != false)
            {
                hash ^= IsHaveVariance.GetHashCode();
            }
            if (IsGnssDoubleAntenna != false)
            {
                hash ^= IsGnssDoubleAntenna.GetHashCode();
            }
            hash ^= measureCovar_.GetHashCode();
            return(hash);
        }