Пример #1
0
        /// <summary>Indicates whether the current object is equal to another object of the same type.</summary>
        /// <returns><c>true</c> if the current object is equal to the <paramref name="other" /> parameter; otherwise, <c>false</c>.</returns>
        /// <param name="other">An object to compare with this object.</param>
        public bool Equals(StatisticsCalculationResult other)
        {
            //check for null
            if (other is null)
            {
                return(false);
            }

            //check for same reference
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            //check for same values
            return(MinX.Equals(other.MinX) &&
                   MinY.Equals(other.MinY) &&
                   MaxX.Equals(other.MaxX) &&
                   MaxY.Equals(other.MaxY) &&
                   UsedAreaWidth.Equals(other.UsedAreaWidth) &&
                   UsedAreaHeight.Equals(other.UsedAreaHeight) &&
                   UsedTiles.Equals(other.UsedTiles) &&
                   MinTiles.Equals(other.MinTiles) &&
                   Efficiency.Equals(other.Efficiency));
        }
Пример #2
0
 public bool Equals(Extent other)
 {
     return(other != null &&
            MaxX.Equals(other.MaxX) &&
            MaxY.Equals(other.MaxY) &&
            MinX.Equals(other.MinX) &&
            MinY.Equals(other.MinY));
 }
Пример #3
0
        protected bool Equals(SpatialOptions other)
        {
            var result = Type == other.Type && Strategy == other.Strategy;

            if (Type == SpatialFieldType.Geography)
            {
                result = result && Units == other.Units;
            }

            if (Strategy != SpatialSearchStrategy.BoundingBox)
            {
                result = result && MaxTreeLevel == other.MaxTreeLevel;

                if (Type == SpatialFieldType.Cartesian)
                {
                    result = result &&
                             MinX.Equals(other.MinX) &&
                             MaxX.Equals(other.MaxX) &&
                             MinY.Equals(other.MinY) &&
                             MaxY.Equals(other.MaxY);
                }
            }
            return(result);
        }
Пример #4
0
 protected bool Equals(SpatialBounds other)
 {
     return(MinX.Equals(other.MinX) && MaxX.Equals(other.MaxX) && MinY.Equals(other.MinY) && MaxY.Equals(other.MaxY));
 }