示例#1
0
 /// <summary>
 /// Gets the hash code
 /// </summary>
 /// <returns>Hash code</returns>
 public override int GetHashCode()
 {
     unchecked // Overflow is fine, just wrap
     {
         int hashCode = 41;
         if (Points != null)
         {
             hashCode = hashCode * 59 + Points.GetHashCode();
         }
         if (FromPoints != null)
         {
             hashCode = hashCode * 59 + FromPoints.GetHashCode();
         }
         if (ToPoints != null)
         {
             hashCode = hashCode * 59 + ToPoints.GetHashCode();
         }
         if (OutArrays != null)
         {
             hashCode = hashCode * 59 + OutArrays.GetHashCode();
         }
         if (Vehicle != null)
         {
             hashCode = hashCode * 59 + Vehicle.GetHashCode();
         }
         return(hashCode);
     }
 }
示例#2
0
        /// <summary>
        /// Returns true if MatrixRequest instances are equal
        /// </summary>
        /// <param name="input">Instance of MatrixRequest to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(MatrixRequest input)
        {
            if (input == null)
            {
                return(false);
            }

            return
                ((
                     Points == input.Points ||
                     Points != null &&
                     Points.SequenceEqual(input.Points)
                     ) &&
                 (
                     FromPoints == input.FromPoints ||
                     FromPoints != null &&
                     FromPoints.SequenceEqual(input.FromPoints)
                 ) &&
                 (
                     ToPoints == input.ToPoints ||
                     ToPoints != null &&
                     ToPoints.SequenceEqual(input.ToPoints)
                 ) &&
                 (
                     OutArrays == input.OutArrays ||
                     OutArrays != null &&
                     OutArrays.SequenceEqual(input.OutArrays)
                 ) &&
                 (
                     Vehicle == input.Vehicle ||
                     (Vehicle != null &&
                      Vehicle.Equals(input.Vehicle))
                 ));
        }