/// <summary>
        /// Compares two ChangeAvailability requests for equality.
        /// </summary>
        /// <param name="ChangeAvailabilityRequest">A ChangeAvailability request to compare with.</param>
        /// <returns>True if both match; False otherwise.</returns>
        public override Boolean Equals(ChangeAvailabilityRequest ChangeAvailabilityRequest)
        {
            if (ChangeAvailabilityRequest is null)
            {
                return(false);
            }

            return(ConnectorId.Equals(ChangeAvailabilityRequest.ConnectorId) &&
                   Availability.Equals(ChangeAvailabilityRequest.Availability));
        }
        /// <summary>
        /// Compares two set charging profile requests for equality.
        /// </summary>
        /// <param name="SetChargingProfileRequest">A set charging profile request to compare with.</param>
        /// <returns>True if both match; False otherwise.</returns>
        public override Boolean Equals(SetChargingProfileRequest SetChargingProfileRequest)
        {
            if ((Object)SetChargingProfileRequest == null)
            {
                return(false);
            }

            return(ConnectorId.Equals(SetChargingProfileRequest.ConnectorId) &&
                   ChargingProfile.Equals(SetChargingProfileRequest.ChargingProfile));
        }
Exemplo n.º 3
0
        /// <summary>
        /// Compares two change availability requests for equality.
        /// </summary>
        /// <param name="ChangeAvailabilityRequest">A change availability request to compare with.</param>
        /// <returns>True if both match; False otherwise.</returns>
        public override Boolean Equals(ChangeAvailabilityRequest ChangeAvailabilityRequest)
        {
            if ((Object)ChangeAvailabilityRequest == null)
            {
                return(false);
            }

            return(ConnectorId.Equals(ChangeAvailabilityRequest.ConnectorId) &&
                   Type.Equals(ChangeAvailabilityRequest.Type));
        }
Exemplo n.º 4
0
        /// <summary>
        /// Compares two GetCompositeSchedule requests for equality.
        /// </summary>
        /// <param name="GetCompositeScheduleRequest">A GetCompositeSchedule request to compare with.</param>
        /// <returns>True if both match; False otherwise.</returns>
        public override Boolean Equals(GetCompositeScheduleRequest GetCompositeScheduleRequest)
        {
            if (GetCompositeScheduleRequest is null)
            {
                return(false);
            }

            return(ConnectorId.Equals(GetCompositeScheduleRequest.ConnectorId) &&
                   Duration.Equals(GetCompositeScheduleRequest.Duration) &&

                   ((!ChargingRateUnit.HasValue && !GetCompositeScheduleRequest.ChargingRateUnit.HasValue) ||
                    (ChargingRateUnit.HasValue && GetCompositeScheduleRequest.ChargingRateUnit.HasValue && ChargingRateUnit.Value.Equals(GetCompositeScheduleRequest.ChargingRateUnit.Value))));
        }
Exemplo n.º 5
0
        /// <summary>
        /// Compares two meter values requests for equality.
        /// </summary>
        /// <param name="MeterValuesRequest">A meter values request to compare with.</param>
        /// <returns>True if both match; False otherwise.</returns>
        public override Boolean Equals(MeterValuesRequest MeterValuesRequest)
        {
            if (MeterValuesRequest is null)
            {
                return(false);
            }

            return(ConnectorId.Equals(MeterValuesRequest.ConnectorId) &&

                   ((!TransactionId.HasValue && !MeterValuesRequest.TransactionId.HasValue) ||
                    (TransactionId.HasValue && MeterValuesRequest.TransactionId.HasValue && TransactionId.Value.Equals(MeterValuesRequest.TransactionId.Value))) &&

                   MeterValues.Count().Equals(MeterValuesRequest.MeterValues.Count()));
        }
Exemplo n.º 6
0
        /// <summary>
        /// Compares two reserve now requests for equality.
        /// </summary>
        /// <param name="ReserveNowRequest">A reserve now request to compare with.</param>
        /// <returns>True if both match; False otherwise.</returns>
        public override Boolean Equals(ReserveNowRequest ReserveNowRequest)
        {
            if (ReserveNowRequest is null)
            {
                return(false);
            }

            return(ReservationId.Equals(ReserveNowRequest.ReservationId) &&
                   ConnectorId.Equals(ReserveNowRequest.ConnectorId) &&
                   ExpiryDate.Equals(ReserveNowRequest.ExpiryDate) &&
                   IdTag.Equals(ReserveNowRequest.IdTag) &&

                   ((!ParentIdTag.HasValue && !ReserveNowRequest.ParentIdTag.HasValue) ||
                    (ParentIdTag.HasValue && ReserveNowRequest.ParentIdTag.HasValue && ParentIdTag.Equals(ReserveNowRequest.ParentIdTag))));
        }
Exemplo n.º 7
0
        /// <summary>
        /// Compares two start transaction requests for equality.
        /// </summary>
        /// <param name="StartTransactionRequest">A start transaction request to compare with.</param>
        /// <returns>True if both match; False otherwise.</returns>
        public override Boolean Equals(StartTransactionRequest StartTransactionRequest)
        {
            if (StartTransactionRequest is null)
            {
                return(false);
            }

            return(ConnectorId.Equals(StartTransactionRequest.ConnectorId) &&
                   IdTag.Equals(StartTransactionRequest.IdTag) &&
                   StartTimestamp.Equals(StartTransactionRequest.StartTimestamp) &&
                   MeterStart.Equals(StartTransactionRequest.MeterStart) &&

                   ((!ReservationId.HasValue && !StartTransactionRequest.ReservationId.HasValue) ||
                    (ReservationId.HasValue && StartTransactionRequest.ReservationId.HasValue && ReservationId.Equals(StartTransactionRequest.ReservationId))));
        }
Exemplo n.º 8
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))));
        }
Exemplo n.º 9
0
        /// <summary>
        /// Compares two StatusNotification requests for equality.
        /// </summary>
        /// <param name="StatusNotificationRequest">A StatusNotification 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(ConnectorId.Equals(StatusNotificationRequest.ConnectorId) &&
                   Status.Equals(StatusNotificationRequest.Status) &&
                   ErrorCode.Equals(StatusNotificationRequest.ErrorCode) &&

                   Info.Equals(StatusNotificationRequest.Info) &&

                   ((!StatusTimestamp.HasValue && !StatusNotificationRequest.StatusTimestamp.HasValue) ||
                    (StatusTimestamp.HasValue && StatusNotificationRequest.StatusTimestamp.HasValue && StatusTimestamp.Value.Equals(StatusNotificationRequest.StatusTimestamp.Value))) &&

                   VendorId.Equals(StatusNotificationRequest.VendorId) &&
                   VendorErrorCode.Equals(StatusNotificationRequest.VendorErrorCode));
        }
        /// <summary>
        /// Compares two get composite schedule responses for equality.
        /// </summary>
        /// <param name="GetCompositeScheduleResponse">A get composite schedule response to compare with.</param>
        /// <returns>True if both match; False otherwise.</returns>
        public override Boolean Equals(GetCompositeScheduleResponse GetCompositeScheduleResponse)
        {
            if (GetCompositeScheduleResponse is null)
            {
                return(false);
            }

            return(Status.Equals(GetCompositeScheduleResponse.Status) &&

                   ((ConnectorId == null && GetCompositeScheduleResponse.ConnectorId == null) ||
                    (ConnectorId != null && GetCompositeScheduleResponse.ConnectorId != null && ConnectorId.Equals(GetCompositeScheduleResponse.ConnectorId))) &&

                   ((!ScheduleStart.HasValue && !GetCompositeScheduleResponse.ScheduleStart.HasValue) ||
                    (ScheduleStart.HasValue && GetCompositeScheduleResponse.ScheduleStart.HasValue && ScheduleStart.Value.Equals(GetCompositeScheduleResponse.ScheduleStart.Value))) &&

                   ((ChargingSchedule == null && GetCompositeScheduleResponse.ChargingSchedule == null) ||
                    (ChargingSchedule != null && GetCompositeScheduleResponse.ChargingSchedule != null && ChargingSchedule.Equals(GetCompositeScheduleResponse.ChargingSchedule))));
        }
        /// <summary>
        /// Compares two clear charging profile requests for equality.
        /// </summary>
        /// <param name="ClearChargingProfileRequest">A clear charging profile request to compare with.</param>
        /// <returns>True if both match; False otherwise.</returns>
        public override Boolean Equals(ClearChargingProfileRequest ClearChargingProfileRequest)
        {
            if ((Object)ClearChargingProfileRequest == null)
            {
                return(false);
            }

            return(((ChargingProfileId == null && ClearChargingProfileRequest.ChargingProfileId == null) ||
                    (ChargingProfileId != null && ClearChargingProfileRequest.ChargingProfileId != null && ChargingProfileId.Equals(ClearChargingProfileRequest.ChargingProfileId))) &&

                   ((ConnectorId == null && ClearChargingProfileRequest.ConnectorId == null) ||
                    (ConnectorId != null && ClearChargingProfileRequest.ConnectorId != null && ConnectorId.Equals(ClearChargingProfileRequest.ConnectorId))) &&

                   ((!ChargingProfilePurpose.HasValue && !ClearChargingProfileRequest.ChargingProfilePurpose.HasValue) ||
                    (ChargingProfilePurpose.HasValue && ClearChargingProfileRequest.ChargingProfilePurpose.HasValue && ChargingProfilePurpose.Value.Equals(ClearChargingProfileRequest.ChargingProfilePurpose.Value))) &&

                   ((!StackLevel.HasValue && !ClearChargingProfileRequest.StackLevel.HasValue) ||
                    (StackLevel.HasValue && ClearChargingProfileRequest.StackLevel.HasValue && StackLevel.Value.Equals(ClearChargingProfileRequest.StackLevel.Value))));
        }