Base class for all IGeometryObject implementing types
Inheritance: IGeoJSONObject
Exemplo n.º 1
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));
        }
Exemplo n.º 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);
        }