Ejemplo n.º 1
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 (MinimumFeeRate != null)
         {
             hashCode = hashCode * 59 + MinimumFeeRate.GetHashCode();
         }
         if (AdditionalInfo != null)
         {
             hashCode = hashCode * 59 + AdditionalInfo.GetHashCode();
         }
         if (ElegibilityCriteriaInfo != null)
         {
             hashCode = hashCode * 59 + ElegibilityCriteriaInfo.GetHashCode();
         }
         if (ClosingProcessInfo != null)
         {
             hashCode = hashCode * 59 + ClosingProcessInfo.GetHashCode();
         }
         return(hashCode);
     }
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Returns true if CreditCardTermsConditions instances are equal
        /// </summary>
        /// <param name="other">Instance of CreditCardTermsConditions to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(CreditCardTermsConditions other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     MinimumFeeRate == other.MinimumFeeRate ||
                     MinimumFeeRate != null &&
                     MinimumFeeRate.Equals(other.MinimumFeeRate)
                     ) &&
                 (
                     AdditionalInfo == other.AdditionalInfo ||
                     AdditionalInfo != null &&
                     AdditionalInfo.Equals(other.AdditionalInfo)
                 ) &&
                 (
                     ElegibilityCriteriaInfo == other.ElegibilityCriteriaInfo ||
                     ElegibilityCriteriaInfo != null &&
                     ElegibilityCriteriaInfo.Equals(other.ElegibilityCriteriaInfo)
                 ) &&
                 (
                     ClosingProcessInfo == other.ClosingProcessInfo ||
                     ClosingProcessInfo != null &&
                     ClosingProcessInfo.Equals(other.ClosingProcessInfo)
                 ));
        }