/// <summary> /// Compares two instances of this object. /// </summary> /// <param name="AuthInfo">An object to compare with.</param> public Int32 CompareTo(AuthInfo AuthInfo) { if ((Object)AuthInfo == null) { throw new ArgumentNullException("The given AuthInfo must not be null!"); } if (_AuthToken != null && AuthInfo._AuthToken != null) { return(_AuthToken.CompareTo(AuthInfo._AuthToken)); } if (_QRCodeIdentification != null && AuthInfo._QRCodeIdentification != null) { return(_QRCodeIdentification.CompareTo(AuthInfo._QRCodeIdentification)); } if (_PlugAndChargeIdentification != null && AuthInfo._PlugAndChargeIdentification != null) { return(_PlugAndChargeIdentification.CompareTo(AuthInfo._PlugAndChargeIdentification)); } if (_RemoteIdentification != null && AuthInfo._RemoteIdentification != null) { return(_RemoteIdentification.CompareTo(AuthInfo._RemoteIdentification)); } return(this.ToString().CompareTo(AuthInfo.ToString())); }
/// <summary> /// Compares two instances of this object. /// </summary> /// <param name="eMAIdWithPIN2">An object to compare with.</param> public Int32 CompareTo(eMAIdWithPIN2 eMAIdWithPIN2) { if ((Object)eMAIdWithPIN2 == null) { throw new ArgumentNullException("The given eMAIdWithPIN2 must not be null!"); } // Compare EVSE Ids var _Result = _eMAId.CompareTo(eMAIdWithPIN2._eMAId); // If equal: Compare EVSE status if (_Result == 0) { _Result = _PIN.CompareTo(eMAIdWithPIN2._PIN); } return(_Result); }
/// <summary> /// Compares two instances of this object. /// </summary> /// <param name="eMAIdStatus">An object to compare with.</param> public Int32 CompareTo(eMAIdStatus eMAIdStatus) { if ((Object)eMAIdStatus == null) { throw new ArgumentNullException("The given eMAIdStatus must not be null!"); } // Compare EVSE Ids var _Result = _Id.CompareTo(eMAIdStatus._Id); // If equal: Compare EVSE status if (_Result == 0) { _Result = _Status.CompareTo(eMAIdStatus._Status); } return(_Result); }