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