/// <summary>
        /// Compares two pull EVSE status requests for equality.
        /// </summary>
        /// <param name="PullEVSEStatus">An pull EVSE status request to compare with.</param>
        /// <returns>True if both match; False otherwise.</returns>
        public override Boolean Equals(PullEVSEStatusRequest PullEVSEStatus)
        {
            if ((Object)PullEVSEStatus == null)
            {
                return(false);
            }

            return(ProviderId.Equals(PullEVSEStatus.ProviderId) &&
                   DistanceKM.Equals(PullEVSEStatus.DistanceKM) &&

                   ((!SearchCenter.HasValue && !PullEVSEStatus.SearchCenter.HasValue) ||
                    (SearchCenter.HasValue && PullEVSEStatus.SearchCenter.HasValue && SearchCenter.Value.Equals(PullEVSEStatus.SearchCenter.Value))) &&

                   ((!EVSEStatusFilter.HasValue && !PullEVSEStatus.EVSEStatusFilter.HasValue) ||
                    (EVSEStatusFilter.HasValue && PullEVSEStatus.EVSEStatusFilter.HasValue && EVSEStatusFilter.Value.Equals(PullEVSEStatus.EVSEStatusFilter.Value))));
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Compares two pull EVSE data requests for equality.
        /// </summary>
        /// <param name="PullEVSEData">An pull EVSE data request to compare with.</param>
        /// <returns>True if both match; False otherwise.</returns>
        public override Boolean Equals(PullEVSEDataRequest PullEVSEData)
        {
            if ((Object)PullEVSEData == null)
            {
                return(false);
            }

            return(ProviderId.Equals(PullEVSEData.ProviderId) &&
                   DistanceKM.Equals(PullEVSEData.DistanceKM) &&
                   GeoCoordinatesResponseFormat.Equals(PullEVSEData.GeoCoordinatesResponseFormat) &&

                   ((!SearchCenter.HasValue && !PullEVSEData.SearchCenter.HasValue) ||
                    (SearchCenter.HasValue && PullEVSEData.SearchCenter.HasValue && SearchCenter.Value.Equals(PullEVSEData.SearchCenter.Value))) &&

                   ((!LastCall.HasValue && !PullEVSEData.LastCall.HasValue) ||
                    (LastCall.HasValue && PullEVSEData.LastCall.HasValue && LastCall.Value.Equals(PullEVSEData.LastCall.Value))));
        }