/// <summary> /// Compares two mobile authorize start requests for equality. /// </summary> /// <param name="MobileAuthorizeStartRequest">A mobile authorize start request to compare with.</param> /// <returns>True if both match; False otherwise.</returns> public override Boolean Equals(MobileAuthorizeStartRequest MobileAuthorizeStartRequest) { if ((Object)MobileAuthorizeStartRequest == null) { return(false); } return(EVSEId.Equals(MobileAuthorizeStartRequest.EVSEId) && QRCodeIdentification.Equals(MobileAuthorizeStartRequest.QRCodeIdentification) && ((!PartnerProductId.HasValue && !MobileAuthorizeStartRequest.PartnerProductId.HasValue) || (PartnerProductId.HasValue && MobileAuthorizeStartRequest.PartnerProductId.HasValue && PartnerProductId.Value.Equals(MobileAuthorizeStartRequest.PartnerProductId.Value))) && ((!GetNewSession.HasValue && !MobileAuthorizeStartRequest.GetNewSession.HasValue) || (GetNewSession.HasValue && MobileAuthorizeStartRequest.GetNewSession.HasValue && GetNewSession.Value.Equals(MobileAuthorizeStartRequest.GetNewSession.Value)))); }
/// <summary> /// Compares two EVSE identifications for equality. /// </summary> /// <param name="AAuthentication">An EVSE identification to compare with.</param> /// <returns>True if both match; False otherwise.</returns> public Boolean Equals(AAuthentication AAuthentication) { if ((Object)AAuthentication == null) { return(false); } if (AuthToken.HasValue && AAuthentication.AuthToken.HasValue) { return(AuthToken.Value.Equals(AAuthentication.AuthToken.Value)); } if (QRCodeIdentification != null && AAuthentication.QRCodeIdentification != null) { return(QRCodeIdentification.Equals(AAuthentication.QRCodeIdentification)); } if (PlugAndChargeIdentification.HasValue && AAuthentication.PlugAndChargeIdentification.HasValue) { return(PlugAndChargeIdentification.Value.Equals(AAuthentication.PlugAndChargeIdentification.Value)); } if (RemoteIdentification.HasValue && AAuthentication.RemoteIdentification.HasValue) { return(RemoteIdentification.Value.Equals(AAuthentication.RemoteIdentification.Value)); } if (PIN.HasValue && AAuthentication.PIN.HasValue) { return(PIN.Value.Equals(AAuthentication.PIN.Value)); } if (PublicKey != null && AAuthentication.PublicKey != null) { return(PublicKey.Fingerprint.ToHexString().Equals(AAuthentication.PublicKey.Fingerprint.ToHexString())); } return(false); }