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

            return
                ((
                     RequestorId == other.RequestorId ||
                     RequestorId != null &&
                     RequestorId.Equals(other.RequestorId)
                     ) &&
                 (
                     Demand == other.Demand ||
                     Demand != null &&
                     Demand.Equals(other.Demand)
                 ) &&
                 (
                     ProviderId == other.ProviderId ||
                     ProviderId != null &&
                     ProviderId.Equals(other.ProviderId)
                 ) &&
                 (
                     Offer == other.Offer ||
                     Offer != null &&
                     Offer.Equals(other.Offer)
                 ));
        }
        /// <summary>
        /// Compares two authorize remote reservation start requests for equality.
        /// </summary>
        /// <param name="AuthorizeRemoteReservationStartRequest">An authorize remote reservation start request to compare with.</param>
        /// <returns>True if both match; False otherwise.</returns>
        public override Boolean Equals(AuthorizeRemoteReservationStartRequest AuthorizeRemoteReservationStartRequest)
        {
            if (AuthorizeRemoteReservationStartRequest is null)
            {
                return(false);
            }

            return(ProviderId.Equals(AuthorizeRemoteReservationStartRequest.ProviderId) &&
                   EVSEId.Equals(AuthorizeRemoteReservationStartRequest.EVSEId) &&
                   Identification.Equals(AuthorizeRemoteReservationStartRequest.Identification) &&

                   ((!SessionId.HasValue && !AuthorizeRemoteReservationStartRequest.SessionId.HasValue) ||
                    (SessionId.HasValue && AuthorizeRemoteReservationStartRequest.SessionId.HasValue && SessionId.Value.Equals(AuthorizeRemoteReservationStartRequest.SessionId.Value))) &&

                   ((!CPOPartnerSessionId.HasValue && !AuthorizeRemoteReservationStartRequest.CPOPartnerSessionId.HasValue) ||
                    (CPOPartnerSessionId.HasValue && AuthorizeRemoteReservationStartRequest.CPOPartnerSessionId.HasValue && CPOPartnerSessionId.Value.Equals(AuthorizeRemoteReservationStartRequest.CPOPartnerSessionId.Value))) &&

                   ((!EMPPartnerSessionId.HasValue && !AuthorizeRemoteReservationStartRequest.EMPPartnerSessionId.HasValue) ||
                    (EMPPartnerSessionId.HasValue && AuthorizeRemoteReservationStartRequest.EMPPartnerSessionId.HasValue && EMPPartnerSessionId.Value.Equals(AuthorizeRemoteReservationStartRequest.EMPPartnerSessionId.Value))) &&

                   ((!PartnerProductId.HasValue && !AuthorizeRemoteReservationStartRequest.PartnerProductId.HasValue) ||
                    (PartnerProductId.HasValue && AuthorizeRemoteReservationStartRequest.PartnerProductId.HasValue && PartnerProductId.Value.Equals(AuthorizeRemoteReservationStartRequest.PartnerProductId.Value))) &&

                   ((!Duration.HasValue && !AuthorizeRemoteReservationStartRequest.Duration.HasValue) ||
                    (Duration.HasValue && AuthorizeRemoteReservationStartRequest.Duration.HasValue && Duration.Value.Equals(AuthorizeRemoteReservationStartRequest.Duration.Value))));
        }
예제 #3
0
        /// <summary>
        /// Compares two charging station identifications for equality.
        /// </summary>
        /// <param name="eMobilityStationId">A charging station identification to compare with.</param>
        /// <returns>True if both match; False otherwise.</returns>
        public Boolean Equals(eMobilityStation_Id eMobilityStationId)
        {
            if ((Object)eMobilityStationId == null)
            {
                return(false);
            }

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

            return(ProviderId.Equals(PullEVSEStatus.ProviderId) &&
                   OperatorIds.Count().Equals(PullEVSEStatus.OperatorIds.Count()));
        }
        /// <summary>
        /// Compares two provider authentication data for equality.
        /// </summary>
        /// <param name="ProviderAuthenticationData">A push authentication data request to compare with.</param>
        /// <returns>True if both match; False otherwise.</returns>
        public Boolean Equals(ProviderAuthenticationData ProviderAuthenticationData)
        {
            if ((Object)ProviderAuthenticationData == null)
            {
                return(false);
            }

            return(ProviderId.Equals(ProviderAuthenticationData.ProviderId) &&
                   AuthorizationIdentifications.Count().Equals(ProviderAuthenticationData.AuthorizationIdentifications.Count()));
        }
예제 #6
0
        /// <summary>
        /// Compares two get charge detail records requests for equality.
        /// </summary>
        /// <param name="GetChargeDetailRecords">A get charge detail records request to compare with.</param>
        /// <returns>True if both match; False otherwise.</returns>
        public override Boolean Equals(GetChargeDetailRecordsRequest GetChargeDetailRecords)
        {
            if ((Object)GetChargeDetailRecords == null)
            {
                return(false);
            }

            return(ProviderId.Equals(GetChargeDetailRecords.ProviderId) &&
                   From.Equals(GetChargeDetailRecords.From) &&
                   To.Equals(GetChargeDetailRecords.To));
        }
        /// <summary>
        /// Compares two push authentication data requests for equality.
        /// </summary>
        /// <param name="PushAuthenticationDataRequest">A push authentication data request to compare with.</param>
        /// <returns>True if both match; False otherwise.</returns>
        public override Boolean Equals(PushAuthenticationDataRequest PushAuthenticationDataRequest)
        {
            if ((Object)PushAuthenticationDataRequest == null)
            {
                return(false);
            }

            return(ProviderAuthenticationData.Equals(PushAuthenticationDataRequest.ProviderAuthenticationData) &&
                   ProviderId.Equals(PushAuthenticationDataRequest.ProviderId) &&
                   OICPAction.Equals(PushAuthenticationDataRequest.OICPAction));
        }
예제 #8
0
        /// <summary>
        /// Compares two contract identifications for equality.
        /// </summary>
        /// <param name="eMobilityAccountId">A contract identification to compare with.</param>
        /// <returns>True if both match; False otherwise.</returns>
        public Boolean Equals(eMobilityAccount_Id eMobilityAccountId)
        {
            if ((Object)eMobilityAccountId == null)
            {
                return(false);
            }

            return(ProviderId.Equals(eMobilityAccountId.ProviderId) &&
                   Suffix.Equals(eMobilityAccountId.Suffix) &&

                   ((!CheckDigit.HasValue && !eMobilityAccountId.CheckDigit.HasValue) ||
                    (CheckDigit.HasValue && eMobilityAccountId.CheckDigit.HasValue && CheckDigit.Value.Equals(eMobilityAccountId.CheckDigit.Value))));
        }
예제 #9
0
        /// <summary>
        /// Compares two charging station identifications for equality.
        /// </summary>
        /// <param name="eVehicleId">A charging station identification to compare with.</param>
        /// <returns>True if both match; False otherwise.</returns>
        public Boolean Equals(eVehicle_Id eVehicleId)
        {
            if ((Object)eVehicleId == null)
            {
                return(false);
            }

            if (!ProviderId.Equals(eVehicleId.ProviderId))
            {
                return(false);
            }

            return(Suffix.Equals(eVehicleId.Suffix));
        }
        /// <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))));
        }
예제 #11
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))));
        }
        /// <summary>
        /// Compares two authorize remote stop requests for equality.
        /// </summary>
        /// <param name="AuthorizeRemoteStopRequest">An authorize remote stop request to compare with.</param>
        /// <returns>True if both match; False otherwise.</returns>
        public override Boolean Equals(AuthorizeRemoteStopRequest AuthorizeRemoteStopRequest)
        {
            if (AuthorizeRemoteStopRequest is null)
            {
                return(false);
            }

            return(SessionId.Equals(AuthorizeRemoteStopRequest.SessionId) &&
                   ProviderId.Equals(AuthorizeRemoteStopRequest.ProviderId) &&
                   EVSEId.Equals(AuthorizeRemoteStopRequest.EVSEId) &&

                   ((!CPOPartnerSessionId.HasValue && !AuthorizeRemoteStopRequest.CPOPartnerSessionId.HasValue) ||
                    (CPOPartnerSessionId.HasValue && AuthorizeRemoteStopRequest.CPOPartnerSessionId.HasValue && CPOPartnerSessionId.Value.Equals(AuthorizeRemoteStopRequest.CPOPartnerSessionId.Value))) &&

                   ((!EMPPartnerSessionId.HasValue && !AuthorizeRemoteStopRequest.EMPPartnerSessionId.HasValue) ||
                    (EMPPartnerSessionId.HasValue && AuthorizeRemoteStopRequest.EMPPartnerSessionId.HasValue && EMPPartnerSessionId.Value.Equals(AuthorizeRemoteStopRequest.EMPPartnerSessionId.Value))));
        }
        public override bool Equals(object obj)
        {
            T_DemandToProvider other = (T_DemandToProvider)obj;

            return(DemandId.Equals(other.DemandId) && ProviderId.Equals(other.ProviderId));
        }
예제 #14
0
 public bool Equals(EventKey other)
 {
     return(ProviderId.Equals(other.ProviderId) && EventIdAndVersion == other.EventIdAndVersion);
 }