/// <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))));
        }
        /// <summary>
        /// Compares two charge detail recordes for equality.
        /// </summary>
        /// <param name="ChargeDetailRecord">An charge detail record to compare with.</param>
        /// <returns>True if both match; False otherwise.</returns>
        public Boolean Equals(ChargeDetailRecord ChargeDetailRecord)
        {
            if ((Object)ChargeDetailRecord == null)
            {
                return(false);
            }

            return(CDRNature.Equals(ChargeDetailRecord.CDRNature) &&
                   ServiceSessionId.Equals(ChargeDetailRecord.ServiceSessionId) &&
                   RequestedServiceId.Equals(ChargeDetailRecord.RequestedServiceId) &&
                   EVSEId.Equals(ChargeDetailRecord.EVSEId) &&
                   UserContractIdAlias.Equals(ChargeDetailRecord.UserContractIdAlias) &&
                   UserId.Equals(ChargeDetailRecord.UserId) &&
                   StartTime.Equals(ChargeDetailRecord.StartTime) &&
                   EndTime.Equals(ChargeDetailRecord.EndTime) &&
                   MeterReports.Equals(ChargeDetailRecord.MeterReports) &&

                   ((!ExecPartnerSessionId.HasValue && !ChargeDetailRecord.ExecPartnerSessionId.HasValue) ||
                    (ExecPartnerSessionId.HasValue && ChargeDetailRecord.ExecPartnerSessionId.HasValue && ExecPartnerSessionId.Value.Equals(ChargeDetailRecord.ExecPartnerSessionId.Value))) &&

                   ((!ExecPartnerOperatorId.HasValue && !ChargeDetailRecord.ExecPartnerOperatorId.HasValue) ||
                    (ExecPartnerOperatorId.HasValue && ChargeDetailRecord.ExecPartnerOperatorId.HasValue && ExecPartnerOperatorId.Value.Equals(ChargeDetailRecord.ExecPartnerOperatorId.Value))) &&

                   ((!SalesPartnerSessionId.HasValue && !ChargeDetailRecord.SalesPartnerSessionId.HasValue) ||
                    (SalesPartnerSessionId.HasValue && ChargeDetailRecord.SalesPartnerSessionId.HasValue && SalesPartnerSessionId.Value.Equals(ChargeDetailRecord.SalesPartnerSessionId.Value))) &&

                   ((!SalesPartnerOperatorId.HasValue && !ChargeDetailRecord.SalesPartnerOperatorId.HasValue) ||
                    (SalesPartnerOperatorId.HasValue && ChargeDetailRecord.SalesPartnerOperatorId.HasValue && SalesPartnerOperatorId.Value.Equals(ChargeDetailRecord.SalesPartnerOperatorId.Value))) &&

                   ((!PartnerProductId.HasValue && !ChargeDetailRecord.PartnerProductId.HasValue) ||
                    (PartnerProductId.HasValue && ChargeDetailRecord.PartnerProductId.HasValue && PartnerProductId.Value.Equals(ChargeDetailRecord.PartnerProductId.Value))));
        }
예제 #3
0
        /// <summary>
        /// Compares two status notification requests for equality.
        /// </summary>
        /// <param name="StatusNotificationRequest">A status notification request to compare with.</param>
        /// <returns>True if both match; False otherwise.</returns>
        public override Boolean Equals(StatusNotificationRequest StatusNotificationRequest)
        {
            if (StatusNotificationRequest is null)
            {
                return(false);
            }

            return(Timestamp.Equals(StatusNotificationRequest.Timestamp) &&
                   ConnectorStatus.Equals(StatusNotificationRequest.ConnectorStatus) &&
                   EVSEId.Equals(StatusNotificationRequest.EVSEId) &&
                   ConnectorId.Equals(StatusNotificationRequest.ConnectorId) &&

                   ((CustomData == null && StatusNotificationRequest.CustomData == null) ||
                    (CustomData != null && StatusNotificationRequest.CustomData != null && CustomData.Equals(StatusNotificationRequest.CustomData))));
        }
예제 #4
0
        /// <summary>
        /// Compares two mobile authorize start requests for equality.
        /// </summary>
        /// <param name="MobileAuthorizeStartRequest">A mobile authorize start request to compare with.</param>
        /// <returns>True if both match; False otherwise.</returns>
        public override Boolean Equals(MobileAuthorizeStartRequest MobileAuthorizeStartRequest)
        {
            if ((Object)MobileAuthorizeStartRequest == null)
            {
                return(false);
            }

            return(EVSEId.Equals(MobileAuthorizeStartRequest.EVSEId) &&
                   QRCodeIdentification.Equals(MobileAuthorizeStartRequest.QRCodeIdentification) &&

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

                   ((!GetNewSession.HasValue && !MobileAuthorizeStartRequest.GetNewSession.HasValue) ||
                    (GetNewSession.HasValue && MobileAuthorizeStartRequest.GetNewSession.HasValue && GetNewSession.Value.Equals(MobileAuthorizeStartRequest.GetNewSession.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))));
        }
예제 #6
0
        /// <summary>
        /// Compares two EVSEBusyStatus for equality.
        /// </summary>
        /// <param name="EVSEBusyStatus">An EVSEBusyStatus to compare with.</param>
        /// <returns>True if both match; False otherwise.</returns>
        public Boolean Equals(EVSEBusyStatus EVSEBusyStatus)
        {
            if ((Object)EVSEBusyStatus == null)
            {
                return(false);
            }

            return(EVSEId.Equals(EVSEBusyStatus.EVSEId) &&
                   StatusEventDate.Equals(EVSEBusyStatus.StatusEventDate) &&
                   BusyStatus.Equals(EVSEBusyStatus.BusyStatus) &&

                   ((!BusyStatusUntil.HasValue && !EVSEBusyStatus.BusyStatusUntil.HasValue) ||
                    (BusyStatusUntil.HasValue && EVSEBusyStatus.BusyStatusUntil.HasValue && BusyStatusUntil.Value.Equals(EVSEBusyStatus.BusyStatusUntil.Value))) &&

                   ((!BusyStatusComment.IsNeitherNullNorEmpty() && !EVSEBusyStatus.BusyStatusComment.IsNeitherNullNorEmpty()) ||
                    (BusyStatusComment.IsNeitherNullNorEmpty() && EVSEBusyStatus.BusyStatusComment.IsNeitherNullNorEmpty() && BusyStatusComment.Equals(EVSEBusyStatus.BusyStatusComment))));
        }
        /// <summary>
        /// Compares two heartbeat requests for equality.
        /// </summary>
        /// <param name="SetServiceAuthorisationRequest">A heartbeat request to compare with.</param>
        /// <returns>True if both match; False otherwise.</returns>
        public override Boolean Equals(SetServiceAuthorisationRequest SetServiceAuthorisationRequest)
        {

            if ((Object) SetServiceAuthorisationRequest == null)
                return false;

            return ((!TransactionId.HasValue && !SetServiceAuthorisationRequest.TransactionId.HasValue) ||
                     (TransactionId.HasValue && SetServiceAuthorisationRequest.TransactionId.HasValue && TransactionId.Value.Equals(SetServiceAuthorisationRequest.TransactionId.Value))) &&

                   PartnerId.         Equals(SetServiceAuthorisationRequest.PartnerId)          &&
                   OperatorId.        Equals(SetServiceAuthorisationRequest.OperatorId)         &&
                   EVSEId.            Equals(SetServiceAuthorisationRequest.EVSEId)             &&
                   UserId.            Equals(SetServiceAuthorisationRequest.UserId)             &&
                   RequestedServiceId.Equals(SetServiceAuthorisationRequest.RequestedServiceId);

                   //((!PartnerServiceSessionId.HasValue && !SetServiceAuthorisationRequest.PartnerServiceSessionId.HasValue) ||
                   //  (PartnerServiceSessionId.HasValue &&  SetServiceAuthorisationRequest.PartnerServiceSessionId.HasValue && PartnerServiceSessionId.Value.Equals(SetServiceAuthorisationRequest.PartnerServiceSessionId.Value)));

        }
예제 #8
0
        /// <summary>
        /// Compares two heartbeat requests for equality.
        /// </summary>
        /// <param name="GetServiceAuthorisationRequest">A heartbeat request to compare with.</param>
        /// <returns>True if both match; False otherwise.</returns>
        public override Boolean Equals(GetServiceAuthorisationRequest GetServiceAuthorisationRequest)
        {
            if ((Object)GetServiceAuthorisationRequest == null)
            {
                return(false);
            }

            return(((!TransactionId.HasValue && !GetServiceAuthorisationRequest.TransactionId.HasValue) ||
                    (TransactionId.HasValue && GetServiceAuthorisationRequest.TransactionId.HasValue && TransactionId.Value.Equals(GetServiceAuthorisationRequest.TransactionId.Value))) &&

                   PartnerId.Equals(GetServiceAuthorisationRequest.PartnerId) &&
                   OperatorId.Equals(GetServiceAuthorisationRequest.OperatorId) &&
                   EVSEId.Equals(GetServiceAuthorisationRequest.EVSEId) &&
                   UserId.Equals(GetServiceAuthorisationRequest.UserId) &&
                   RequestedServiceId.Equals(GetServiceAuthorisationRequest.RequestedServiceId) &&

                   ((!PartnerServiceSessionId.HasValue && !GetServiceAuthorisationRequest.PartnerServiceSessionId.HasValue) ||
                    (PartnerServiceSessionId.HasValue && GetServiceAuthorisationRequest.PartnerServiceSessionId.HasValue && PartnerServiceSessionId.Value.Equals(GetServiceAuthorisationRequest.PartnerServiceSessionId.Value))));
        }
예제 #9
0
        /// <summary>
        /// Compares two heartbeat requests for equality.
        /// </summary>
        /// <param name="GetServiceAuthorisationRequest">A heartbeat request to compare with.</param>
        /// <returns>True if both match; False otherwise.</returns>
        public override Boolean Equals(GetServiceAuthorisationRequest GetServiceAuthorisationRequest)
        {
            if (GetServiceAuthorisationRequest is null)
            {
                return(false);
            }

            return(TransactionId.Equals(GetServiceAuthorisationRequest.TransactionId) &&
                   PartnerId.Equals(GetServiceAuthorisationRequest.PartnerId) &&
                   OperatorId.Equals(GetServiceAuthorisationRequest.OperatorId) &&
                   TargetOperatorId.Equals(GetServiceAuthorisationRequest.TargetOperatorId) &&
                   EVSEId.Equals(GetServiceAuthorisationRequest.EVSEId) &&
                   UserId.Equals(GetServiceAuthorisationRequest.UserId) &&
                   RequestedServiceId.Equals(GetServiceAuthorisationRequest.RequestedServiceId) &&

                   ((!ServiceSessionId.HasValue && !GetServiceAuthorisationRequest.ServiceSessionId.HasValue) ||
                    (ServiceSessionId.HasValue && GetServiceAuthorisationRequest.ServiceSessionId.HasValue && ServiceSessionId.Value.Equals(GetServiceAuthorisationRequest.ServiceSessionId.Value))) &&

                   ((!BookingId.HasValue && !GetServiceAuthorisationRequest.BookingId.HasValue) ||
                    (BookingId.HasValue && GetServiceAuthorisationRequest.BookingId.HasValue && BookingId.Value.Equals(GetServiceAuthorisationRequest.BookingId.Value))));
        }
        /// <summary>
        /// Compares two SetEVSEBusyStatus requests for equality.
        /// </summary>
        /// <param name="SetEVSEBusyStatusRequest">A SetEVSEBusyStatus request to compare with.</param>
        /// <returns>True if both match; False otherwise.</returns>
        public override Boolean Equals(SetEVSEBusyStatusRequest SetEVSEBusyStatusRequest)
        {
            if ((Object)SetEVSEBusyStatusRequest == null)
            {
                return(false);
            }

            return(((!TransactionId.HasValue && !SetEVSEBusyStatusRequest.TransactionId.HasValue) ||
                    (TransactionId.HasValue && SetEVSEBusyStatusRequest.TransactionId.HasValue && TransactionId.Value.Equals(SetEVSEBusyStatusRequest.TransactionId.Value))) &&

                   PartnerId.Equals(SetEVSEBusyStatusRequest.PartnerId) &&
                   OperatorId.Equals(SetEVSEBusyStatusRequest.OperatorId) &&
                   EVSEId.Equals(SetEVSEBusyStatusRequest.EVSEId) &&
                   StatusEventDate.Equals(SetEVSEBusyStatusRequest.StatusEventDate) &&
                   BusyStatus.Equals(SetEVSEBusyStatusRequest.BusyStatus) &&

                   ((!BusyStatusUntil.HasValue && !SetEVSEBusyStatusRequest.BusyStatusUntil.HasValue) ||
                    (BusyStatusUntil.HasValue && SetEVSEBusyStatusRequest.BusyStatusUntil.HasValue && BusyStatusUntil.Value.Equals(SetEVSEBusyStatusRequest.BusyStatusUntil.Value))) &&

                   ((!BusyStatusComment.IsNeitherNullNorEmpty() && !SetEVSEBusyStatusRequest.BusyStatusComment.IsNeitherNullNorEmpty()) ||
                    (BusyStatusComment.IsNeitherNullNorEmpty() && SetEVSEBusyStatusRequest.BusyStatusComment.IsNeitherNullNorEmpty() && BusyStatusComment.Equals(SetEVSEBusyStatusRequest.BusyStatusComment))));
        }
            /// <summary>
            /// Compares two charge detail record builder for equality.
            /// </summary>
            /// <param name="ChargeDetailRecordBuilder">A charge detail record builder to compare with.</param>
            /// <returns>True if both match; False otherwise.</returns>
            public Boolean Equals(Builder ChargeDetailRecordBuilder)
            {
                if (ChargeDetailRecordBuilder == null)
                {
                    return(false);
                }

                return(CDRNature.Equals(ChargeDetailRecordBuilder.CDRNature) &&
                       ServiceSessionId.Equals(ChargeDetailRecordBuilder.ServiceSessionId) &&
                       RequestedServiceId.Equals(ChargeDetailRecordBuilder.RequestedServiceId) &&
                       EVSEId.Equals(ChargeDetailRecordBuilder.EVSEId) &&
                       UserContractIdAlias.Equals(ChargeDetailRecordBuilder.UserContractIdAlias) &&
                       UserId.Equals(ChargeDetailRecordBuilder.UserId) &&
                       StartTime.Equals(ChargeDetailRecordBuilder.StartTime) &&
                       EndTime.Equals(ChargeDetailRecordBuilder.EndTime) &&

                       ExecPartnerSessionId.Equals(ChargeDetailRecordBuilder.ExecPartnerSessionId) &&
                       ExecPartnerOperatorId.Equals(ChargeDetailRecordBuilder.ExecPartnerOperatorId) &&
                       SalesPartnerSessionId.Equals(ChargeDetailRecordBuilder.SalesPartnerSessionId) &&
                       SalesPartnerOperatorId.Equals(ChargeDetailRecordBuilder.SalesPartnerOperatorId) &&
                       PartnerProductId.Equals(ChargeDetailRecordBuilder.PartnerProductId) &&
                       MeterReports.Equals(ChargeDetailRecordBuilder.MeterReports));
            }