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

            return
                ((
                     SearchId == other.SearchId ||
                     SearchId != null &&
                     SearchId.Equals(other.SearchId)
                     ) &&
                 (
                     BoundingBoxes == other.BoundingBoxes ||
                     BoundingBoxes != null &&
                     other.BoundingBoxes != null &&
                     BoundingBoxes.SequenceEqual(other.BoundingBoxes)
                 ) &&
                 (
                     Properties == other.Properties ||
                     Properties != null &&
                     Properties.Equals(other.Properties)
                 ));
        }
示例#2
0
        /// <summary>
        /// Determines whether the specified <see cref="GeoJSONObject" />, is equal to this instance.
        /// </summary>
        /// <param name="other">The <see cref="GeoJSONObject" /> to compare with this instance.</param>
        /// <returns>
        ///   <c>true</c> if the specified <see cref="GeoJSONObject" /> is equal to this instance; otherwise, <c>false</c>.
        /// </returns>
        protected virtual bool Equals(GeoJSONObject other)
        {
            if (Type != other.Type)
            {
                return(false);
            }

            if (!Equals(CRS, other.CRS))
            {
                return(false);
            }

            if (BoundingBoxes == null && other.BoundingBoxes == null)
            {
                return(true);
            }

            if ((BoundingBoxes != null && other.BoundingBoxes == null) ||
                (BoundingBoxes == null && other.BoundingBoxes != null))
            {
                return(false);
            }

            return(BoundingBoxes.SequenceEqual(other.BoundingBoxes, DoubleComparer));
        }