/// <summary> /// Return the HashCode of this object. /// </summary> /// <returns>The HashCode of this object.</returns> public override Int32 GetHashCode() { unchecked { return(ProviderId.GetHashCode() * 17 ^ DistanceKM.GetHashCode() * 11 ^ (SearchCenter.HasValue ? SearchCenter.GetHashCode() * 5 : 0) ^ (!EVSEStatusFilter.HasValue ? EVSEStatusFilter.GetHashCode() : 0)); } }
/// <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)))); }
/// <summary> /// Return the HashCode of this object. /// </summary> /// <returns>The HashCode of this object.</returns> public override Int32 GetHashCode() { unchecked { return(ProviderId.GetHashCode() * 17 ^ DistanceKM.GetHashCode() * 13 ^ GeoCoordinatesResponseFormat.GetHashCode() * 11 ^ (SearchCenter.HasValue ? SearchCenter.GetHashCode() * 7 : 0) ^ (!LastCall.HasValue ? LastCall.GetHashCode() * 5 : 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)))); }