Пример #1
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (header_ != null)
            {
                hash ^= Header.GetHashCode();
            }
            if (Id != 0)
            {
                hash ^= Id.GetHashCode();
            }
            if (Label.Length != 0)
            {
                hash ^= Label.GetHashCode();
            }
            if (Score != 0D)
            {
                hash ^= Score.GetHashCode();
            }
            if (bbox_ != null)
            {
                hash ^= Bbox.GetHashCode();
            }
            if (velocity_ != null)
            {
                hash ^= Velocity.GetHashCode();
            }
            return(hash);
        }
Пример #2
0
    public override int GetHashCode()
    {
        int hash = 1;

        if (ClassId != 0)
        {
            hash ^= ClassId.GetHashCode();
        }
        if (Score != 0F)
        {
            hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Score);
        }
        if (bbox_ != null)
        {
            hash ^= Bbox.GetHashCode();
        }
        if (segm_ != null)
        {
            hash ^= Segm.GetHashCode();
        }
        if (florplanpoint_ != null)
        {
            hash ^= Florplanpoint.GetHashCode();
        }
        if (Features.Length != 0)
        {
            hash ^= Features.GetHashCode();
        }
        if (_unknownFields != null)
        {
            hash ^= _unknownFields.GetHashCode();
        }
        return(hash);
    }
 /// <summary>
 /// Gets the hash code
 /// </summary>
 /// <returns>Hash code</returns>
 public override int GetHashCode()
 {
     unchecked // Overflow is fine, just wrap
     {
         int hashCode = 41;
         if (Distance != null)
         {
             hashCode = hashCode * 59 + Distance.GetHashCode();
         }
         if (Time != null)
         {
             hashCode = hashCode * 59 + Time.GetHashCode();
         }
         if (Ascend != null)
         {
             hashCode = hashCode * 59 + Ascend.GetHashCode();
         }
         if (Descend != null)
         {
             hashCode = hashCode * 59 + Descend.GetHashCode();
         }
         if (Points != null)
         {
             hashCode = hashCode * 59 + Points.GetHashCode();
         }
         if (PointsEncoded != null)
         {
             hashCode = hashCode * 59 + PointsEncoded.GetHashCode();
         }
         if (Bbox != null)
         {
             hashCode = hashCode * 59 + Bbox.GetHashCode();
         }
         if (SnappedWaypoints != null)
         {
             hashCode = hashCode * 59 + SnappedWaypoints.GetHashCode();
         }
         if (Instructions != null)
         {
             hashCode = hashCode * 59 + Instructions.GetHashCode();
         }
         return(hashCode);
     }
 }