コード例 #1
0
        /// <summary>
        /// Returns true if FraudResultsRetailDecisions instances are equal
        /// </summary>
        /// <param name="other">Instance of FraudResultsRetailDecisions to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(FraudResultsRetailDecisions other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     FraudCode == other.FraudCode ||
                     FraudCode != null &&
                     FraudCode.Equals(other.FraudCode)
                     ) &&
                 (
                     FraudNeural == other.FraudNeural ||
                     FraudNeural != null &&
                     FraudNeural.Equals(other.FraudNeural)
                 ) &&
                 (
                     FraudRCF == other.FraudRCF ||
                     FraudRCF != null &&
                     FraudRCF.Equals(other.FraudRCF)
                 ));
        }
コード例 #2
0
 /// <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 (FraudCode != null)
         {
             hashCode = hashCode * 59 + FraudCode.GetHashCode();
         }
         if (FraudNeural != null)
         {
             hashCode = hashCode * 59 + FraudNeural.GetHashCode();
         }
         if (FraudRCF != null)
         {
             hashCode = hashCode * 59 + FraudRCF.GetHashCode();
         }
         return(hashCode);
     }
 }