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