Exemplo n.º 1
0
        /// <summary>
        /// Compares two instances of this object.
        /// </summary>
        /// <param name="ReservationId1">An reservation identification.</param>
        /// <param name="ReservationId2">Another reservation identification.</param>
        /// <returns>true|false</returns>
        public static Boolean operator >(Reservation_Id ReservationId1, Reservation_Id ReservationId2)
        {
            if ((Object)ReservationId1 == null)
            {
                throw new ArgumentNullException(nameof(ReservationId1), "The given reservation identification must not be null!");
            }

            return(ReservationId1.CompareTo(ReservationId2) > 0);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Compares two instances of this object.
        /// </summary>
        /// <param name="ReservationId1">A charging reservation identification.</param>
        /// <param name="ReservationId2">Another charging reservation identification.</param>
        /// <returns>true|false</returns>
        public static Boolean operator <(ChargingReservation_Id ReservationId1, ChargingReservation_Id ReservationId2)
        {
            if ((Object)ReservationId1 == null)
            {
                throw new ArgumentNullException(nameof(ReservationId1), "The given charging ReservationId1 must not be null!");
            }

            return(ReservationId1.CompareTo(ReservationId2) < 0);
        }
Exemplo n.º 3
0
        /// <summary>
        /// Compares two instances of this object.
        /// </summary>
        /// <param name="ReservationId1">A charging reservation identification.</param>
        /// <param name="ReservationId2">Another charging reservation identification.</param>
        /// <returns>true|false</returns>
        public static Boolean operator ==(ChargingReservation_Id ReservationId1, ChargingReservation_Id ReservationId2)
        {
            // If both are null, or both are same instance, return true.
            if (Object.ReferenceEquals(ReservationId1, ReservationId2))
            {
                return(true);
            }

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

            return(ReservationId1.Equals(ReservationId2));
        }
Exemplo n.º 4
0
        /// <summary>
        /// Compares two instances of this object.
        /// </summary>
        /// <param name="ReservationId1">An reservation identification.</param>
        /// <param name="ReservationId2">Another reservation identification.</param>
        /// <returns>true|false</returns>
        public static Boolean operator ==(Reservation_Id ReservationId1, Reservation_Id ReservationId2)
        {
            // If both are null, or both are same instance, return true.
            if (ReferenceEquals(ReservationId1, ReservationId2))
            {
                return(true);
            }

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

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

            return(ReservationId1.Equals(ReservationId2));
        }
Exemplo n.º 5
0
        /// <summary>
        /// Compares two instances of this object.
        /// </summary>
        /// <param name="ReservationId1">A reservation identification.</param>
        /// <param name="ReservationId2">Another reservation identification.</param>
        /// <returns>true|false</returns>
        public static Boolean operator >(Reservation_Id ReservationId1,
                                         Reservation_Id ReservationId2)

        => ReservationId1.CompareTo(ReservationId2) > 0;
Exemplo n.º 6
0
        /// <summary>
        /// Compares two instances of this object.
        /// </summary>
        /// <param name="ReservationId1">A reservation identification.</param>
        /// <param name="ReservationId2">Another reservation identification.</param>
        /// <returns>true|false</returns>
        public static Boolean operator ==(Reservation_Id ReservationId1,
                                          Reservation_Id ReservationId2)

        => ReservationId1.Equals(ReservationId2);