Example #1
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 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))));
        }