/// <summary> /// Gets the hash code /// </summary> /// <returns>Hash code</returns> public override int GetHashCode() { unchecked // Overflow is fine, just wrap { var hashCode = 41; // Suitable nullity checks etc, of course :) if (AvsResult != null) { hashCode = hashCode * 59 + AvsResult.GetHashCode(); } if (CvvResult != null) { hashCode = hashCode * 59 + CvvResult.GetHashCode(); } if (Fraugster != null) { hashCode = hashCode * 59 + Fraugster.GetHashCode(); } if (RetailDecisions != null) { hashCode = hashCode * 59 + RetailDecisions.GetHashCode(); } return(hashCode); } }
/// <summary> /// Returns true if CardFraudResults instances are equal /// </summary> /// <param name="other">Instance of CardFraudResults to be compared</param> /// <returns>Boolean</returns> public bool Equals(CardFraudResults other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( AvsResult == other.AvsResult || AvsResult != null && AvsResult.Equals(other.AvsResult) ) && ( CvvResult == other.CvvResult || CvvResult != null && CvvResult.Equals(other.CvvResult) ) && ( Fraugster == other.Fraugster || Fraugster != null && Fraugster.Equals(other.Fraugster) ) && ( RetailDecisions == other.RetailDecisions || RetailDecisions != null && RetailDecisions.Equals(other.RetailDecisions) )); }