/// <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="AuthTokenStatus">An object to compare with.</param> public Int32 CompareTo(AuthTokenStatus AuthTokenStatus) { if ((Object)AuthTokenStatus == null) { throw new ArgumentNullException("The given AuthTokenStatus must not be null!"); } // Compare EVSE Ids var _Result = _AuthToken.CompareTo(AuthTokenStatus._AuthToken); // If equal: Compare EVSE status if (_Result == 0) { _Result = _Status.CompareTo(AuthTokenStatus._Status); } return(_Result); }