/// <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)); }
/// <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)); }
/// <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);