Пример #1
0
        /// <summary>
        /// Compares two instances of this object.
        /// </summary>
        /// <param name="EVSEId1">An EVSE identification.</param>
        /// <param name="EVSEId2">Another EVSE identification.</param>
        /// <returns>true|false</returns>
        public static Boolean operator >(EVSE_Id EVSEId1, EVSE_Id EVSEId2)
        {
            if ((Object)EVSEId1 == null)
            {
                throw new ArgumentNullException(nameof(EVSEId1), "The given EVSE identification must not be null!");
            }

            return(EVSEId1.CompareTo(EVSEId2) > 0);
        }
Пример #2
0
        /// <summary>
        /// Compares two instances of this object.
        /// </summary>
        /// <param name="EVSEId1">A EVSE_Id.</param>
        /// <param name="EVSEId2">Another EVSE_Id.</param>
        /// <returns>true|false</returns>
        public static Boolean operator <(EVSE_Id EVSEId1, EVSE_Id EVSEId2)
        {
            if ((Object)EVSEId1 == null)
            {
                throw new ArgumentNullException("The given EVSEId1 must not be null!");
            }

            return(EVSEId1.CompareTo(EVSEId2) < 0);
        }
Пример #3
0
        /// <summary>
        /// Compares two instances of this object.
        /// </summary>
        /// <param name="EVSEId1">A EVSE identification.</param>
        /// <param name="EVSEId2">Another EVSE identification.</param>
        /// <returns>true|false</returns>
        public static Boolean operator ==(EVSE_Id EVSEId1, EVSE_Id EVSEId2)
        {
            // If both are null, or both are same instance, return true.
            if (Object.ReferenceEquals(EVSEId1, EVSEId2))
            {
                return(true);
            }

            // If one is null, but not both, return false.
            if (((Object)EVSEId1 == null) || ((Object)EVSEId2 == null))
            {
                return(false);
            }

            return(EVSEId1.Equals(EVSEId2));
        }
Пример #4
0
        /// <summary>
        /// Compares two instances of this object.
        /// </summary>
        /// <param name="EVSEId1">An EVSE identification.</param>
        /// <param name="EVSEId2">Another EVSE identification.</param>
        /// <returns>true|false</returns>
        public static Boolean operator ==(EVSE_Id EVSEId1, EVSE_Id EVSEId2)
        {
            // If both are null, or both are same instance, return true.
            if (ReferenceEquals(EVSEId1, EVSEId2))
            {
                return(true);
            }

            // If one is null, but not both, return false.
            if (((Object)EVSEId1 == null) || ((Object)EVSEId2 == null))
            {
                return(false);
            }

            if ((Object)EVSEId1 == null)
            {
                throw new ArgumentNullException(nameof(EVSEId1), "The given EVSE identification must not be null!");
            }

            return(EVSEId1.Equals(EVSEId2));
        }
Пример #5
0
        /// <summary>
        /// Compares two instances of this object.
        /// </summary>
        /// <param name="EVSEId1">A EVSE.</param>
        /// <param name="EVSEId2">Another EVSE.</param>
        /// <returns>true|false</returns>
        public static Boolean operator >(EVSE_UId EVSEId1,
                                         EVSE_UId EVSEId2)

        => EVSEId1.CompareTo(EVSEId2) > 0;
Пример #6
0
        /// <summary>
        /// Compares two instances of this object.
        /// </summary>
        /// <param name="EVSEId1">A EVSE.</param>
        /// <param name="EVSEId2">Another EVSE.</param>
        /// <returns>true|false</returns>
        public static Boolean operator ==(EVSE_UId EVSEId1,
                                          EVSE_UId EVSEId2)

        => EVSEId1.Equals(EVSEId2);
Пример #7
0
        /// <summary>
        /// Compares two instances of this object.
        /// </summary>
        /// <param name="EVSEId1">A EVSE identification.</param>
        /// <param name="EVSEId2">Another EVSE identification.</param>
        /// <returns>true|false</returns>
        public static Boolean operator <(EVSE_Id EVSEId1,
                                         EVSE_Id EVSEId2)

        => EVSEId1.CompareTo(EVSEId2) < 0;
Пример #8
0
 /// <summary>
 /// Compares two instances of this object.
 /// </summary>
 /// <param name="EVSEId1">An EVSE identification.</param>
 /// <param name="EVSEId2">Another EVSE identification.</param>
 /// <returns>true|false</returns>
 public static Boolean operator !=(EVSE_Id EVSEId1, EVSE_Id EVSEId2)
 => !EVSEId1.Equals(EVSEId2);