Ejemplo n.º 1
0
        ///<inheritdoc/>
        public bool Equals(SelectQuery other)
        {
            bool equals = false;

            if (other != null && other.PageSize == PageSize && other.PageIndex == PageIndex && other.Alias == Alias)
            {
                equals = Columns.SequenceEqual(other.Columns) &&
                         ((WhereCriteria == null && other.WhereCriteria == null) || WhereCriteria.Equals(other.WhereCriteria)) &&
                         Tables.SequenceEqual(other.Tables) &&
                         Unions.SequenceEqual(other.Unions) &&
                         Sorts.SequenceEqual(other?.Sorts);
            }

            return(equals);
        }
Ejemplo n.º 2
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)
                 ));
        }