/// <summary>
        /// Returns true if RequestTimeFilter instances are equal
        /// </summary>
        /// <param name="other">Instance of RequestTimeFilter to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(RequestTimeFilter 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)
                 ));
        }
        /// <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)
                 ));
        }
Example #3
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)
                 ));
        }