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

            return(ChargePointVendor.Equals(BootNotificationRequest.ChargePointVendor) &&
                   ChargePointModel.Equals(BootNotificationRequest.ChargePointModel) &&

                   ((ChargePointSerialNumber == null && BootNotificationRequest.ChargePointSerialNumber == null) ||
                    (ChargePointSerialNumber != null && BootNotificationRequest.ChargePointSerialNumber != null &&
                     String.Equals(ChargePointSerialNumber,
                                   BootNotificationRequest.ChargePointSerialNumber,
                                   StringComparison.OrdinalIgnoreCase))) &&

                   ((ChargeBoxSerialNumber == null && BootNotificationRequest.ChargeBoxSerialNumber == null) ||
                    (ChargeBoxSerialNumber != null && BootNotificationRequest.ChargeBoxSerialNumber != null &&
                     String.Equals(ChargeBoxSerialNumber,
                                   BootNotificationRequest.ChargeBoxSerialNumber,
                                   StringComparison.OrdinalIgnoreCase))) &&

                   ((ChargePointSerialNumber == null && BootNotificationRequest.ChargePointSerialNumber == null) ||
                    (ChargePointSerialNumber != null && BootNotificationRequest.ChargePointSerialNumber != null &&
                     String.Equals(ChargePointSerialNumber,
                                   BootNotificationRequest.ChargePointSerialNumber,
                                   StringComparison.OrdinalIgnoreCase))) &&

                   ((FirmwareVersion == null && BootNotificationRequest.FirmwareVersion == null) ||
                    (FirmwareVersion != null && BootNotificationRequest.FirmwareVersion != null &&
                     String.Equals(FirmwareVersion,
                                   BootNotificationRequest.FirmwareVersion,
                                   StringComparison.OrdinalIgnoreCase))) &&

                   ((Iccid == null && BootNotificationRequest.Iccid == null) ||
                    (Iccid != null && BootNotificationRequest.Iccid != null &&
                     String.Equals(Iccid,
                                   BootNotificationRequest.Iccid,
                                   StringComparison.OrdinalIgnoreCase))) &&

                   ((IMSI == null && BootNotificationRequest.IMSI == null) ||
                    (IMSI != null && BootNotificationRequest.IMSI != null &&
                     String.Equals(IMSI,
                                   BootNotificationRequest.IMSI,
                                   StringComparison.OrdinalIgnoreCase))) &&

                   ((MeterType == null && BootNotificationRequest.MeterType == null) ||
                    (MeterType != null && BootNotificationRequest.MeterType != null &&
                     String.Equals(MeterType,
                                   BootNotificationRequest.MeterType,
                                   StringComparison.OrdinalIgnoreCase))) &&

                   ((MeterSerialNumber == null && BootNotificationRequest.MeterSerialNumber == null) ||
                    (MeterSerialNumber != null && BootNotificationRequest.MeterSerialNumber != null &&
                     String.Equals(MeterSerialNumber,
                                   BootNotificationRequest.MeterSerialNumber,
                                   StringComparison.OrdinalIgnoreCase))));
        }
Example #2
0
        /// <summary>
        /// Compares two boot notification requests for equality.
        /// </summary>
        /// <param name="BootNotificationRequest">A boot notification request to compare with.</param>
        /// <returns>True if both match; False otherwise.</returns>
        public override Boolean Equals(BootNotificationRequest BootNotificationRequest)
        {
            if ((Object)BootNotificationRequest == null)
            {
                return(false);
            }

            return(ChargePointVendor.Equals(BootNotificationRequest.ChargePointVendor) &&
                   ChargePointModel.Equals(BootNotificationRequest.ChargePointModel) &&
                   ChargePointSerialNumber.Equals(BootNotificationRequest.ChargePointSerialNumber) &&
                   FirmwareVersion.Equals(BootNotificationRequest.FirmwareVersion) &&
                   Iccid.Equals(BootNotificationRequest.Iccid) &&
                   IMSI.Equals(BootNotificationRequest.IMSI) &&
                   MeterType.Equals(BootNotificationRequest.MeterType) &&
                   MeterSerialNumber.Equals(BootNotificationRequest.MeterSerialNumber));
        }