/// <summary>
        /// Returns true if RequestTimeFilterPostcodeSectors instances are equal
        /// </summary>
        /// <param name="other">Instance of RequestTimeFilterPostcodeSectors to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(RequestTimeFilterPostcodeSectors other)
        {
            if (other is null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     DepartureSearches == other.DepartureSearches ||
                     DepartureSearches != null &&
                     other.DepartureSearches != null &&
                     DepartureSearches.SequenceEqual(other.DepartureSearches)
                     ) &&
                 (
                     ArrivalSearches == other.ArrivalSearches ||
                     ArrivalSearches != null &&
                     other.ArrivalSearches != null &&
                     ArrivalSearches.SequenceEqual(other.ArrivalSearches)
                 ));
        }
Exemple #2
0
        /// <summary>
        /// Returns true if RequestRoutes instances are equal
        /// </summary>
        /// <param name="other">Instance of RequestRoutes to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(RequestRoutes other)
        {
            if (other is null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Locations == other.Locations ||
                     Locations != null &&
                     other.Locations != null &&
                     Locations.SequenceEqual(other.Locations)
                     ) &&
                 (
                     DepartureSearches == other.DepartureSearches ||
                     DepartureSearches != null &&
                     other.DepartureSearches != null &&
                     DepartureSearches.SequenceEqual(other.DepartureSearches)
                 ) &&
                 (
                     ArrivalSearches == other.ArrivalSearches ||
                     ArrivalSearches != null &&
                     other.ArrivalSearches != null &&
                     ArrivalSearches.SequenceEqual(other.ArrivalSearches)
                 ));
        }
Exemple #3
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 (DepartureSearches != null)
         {
             hashCode = hashCode * 59 + DepartureSearches.GetHashCode();
         }
         if (ArrivalSearches != null)
         {
             hashCode = hashCode * 59 + ArrivalSearches.GetHashCode();
         }
         return(hashCode);
     }
 }
Exemple #4
0
        /// <summary>
        /// Returns true if RequestTimeMap instances are equal
        /// </summary>
        /// <param name="other">Instance of RequestTimeMap to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(RequestTimeMap other)
        {
            if (other is null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     DepartureSearches == other.DepartureSearches ||
                     DepartureSearches != null &&
                     other.DepartureSearches != null &&
                     DepartureSearches.SequenceEqual(other.DepartureSearches)
                     ) &&
                 (
                     ArrivalSearches == other.ArrivalSearches ||
                     ArrivalSearches != null &&
                     other.ArrivalSearches != null &&
                     ArrivalSearches.SequenceEqual(other.ArrivalSearches)
                 ) &&
                 (
                     Unions == other.Unions ||
                     Unions != null &&
                     other.Unions != null &&
                     Unions.SequenceEqual(other.Unions)
                 ) &&
                 (
                     Intersections == other.Intersections ||
                     Intersections != null &&
                     other.Intersections != null &&
                     Intersections.SequenceEqual(other.Intersections)
                 ));
        }