/// <summary> /// Return the HashCode of this object. /// </summary> /// <returns>The HashCode of this object.</returns> public override Int32 GetHashCode() { unchecked { return(TransactionId.GetHashCode() * 19 ^ AuthorisationValue.GetHashCode() * 17 ^ ServiceSessionId.GetHashCode() * 13 ^ IntermediateCDRRequested.GetHashCode() * 11 ^ RequestStatus.GetHashCode() * 7 ^ (SalesPartnerOperatorId.HasValue ? SalesPartnerOperatorId.GetHashCode() * 5 : 0) ^ (UserContractIdAlias.HasValue ? UserContractIdAlias.GetHashCode() * 3 : 0) ^ // ToDo: Add MeterLimits.GetHashCode()! (Parameter.IsNotNullOrEmpty() ? Parameter.GetHashCode() : 0)); } }
/// <summary> /// Compares two GetServiceAuthorisation responses for equality. /// </summary> /// <param name="GetServiceAuthorisationResponse">A GetServiceAuthorisation response to compare with.</param> /// <returns>True if both match; False otherwise.</returns> public override Boolean Equals(GetServiceAuthorisationResponse GetServiceAuthorisationResponse) { if (GetServiceAuthorisationResponse is null) { return(false); } return(TransactionId.Equals(GetServiceAuthorisationResponse.TransactionId) && AuthorisationValue.Equals(GetServiceAuthorisationResponse.AuthorisationValue) && PartnerServiceSessionId.Equals(GetServiceAuthorisationResponse.PartnerServiceSessionId) && IntermediateCDRRequested.Equals(GetServiceAuthorisationResponse.IntermediateCDRRequested) && RequestStatus.Equals(GetServiceAuthorisationResponse.RequestStatus) && ((!UserContractIdAlias.HasValue && !GetServiceAuthorisationResponse.UserContractIdAlias.HasValue) || (UserContractIdAlias.HasValue && GetServiceAuthorisationResponse.UserContractIdAlias.HasValue && UserContractIdAlias.Value.Equals(GetServiceAuthorisationResponse.UserContractIdAlias.Value)))); // ToDo: Compare MeterLimitLists! }