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

            return
                ((
                     Fees == other.Fees ||
                     Fees != null &&
                     Fees.SequenceEqual(other.Fees)
                     ) &&
                 (
                     Applications == other.Applications ||
                     Applications != null &&
                     Applications.SequenceEqual(other.Applications)
                 ) &&
                 (
                     MinimumRate == other.MinimumRate ||
                     MinimumRate != null &&
                     MinimumRate.Equals(other.MinimumRate)
                 ) &&
                 (
                     MaximumRate == other.MaximumRate ||
                     MaximumRate != null &&
                     MaximumRate.Equals(other.MaximumRate)
                 ));
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Returns true if InterestRate instances are equal
        /// </summary>
        /// <param name="other">Instance of InterestRate to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(InterestRate other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Fees == other.Fees ||
                     Fees != null &&
                     Fees.SequenceEqual(other.Fees)
                     ) &&
                 (
                     Prices == other.Prices ||
                     Prices != null &&
                     Prices.SequenceEqual(other.Prices)
                 ) &&
                 (
                     MinimumRate == other.MinimumRate ||
                     MinimumRate != null &&
                     MinimumRate.Equals(other.MinimumRate)
                 ) &&
                 (
                     MaximumRate == other.MaximumRate ||
                     MaximumRate != null &&
                     MaximumRate.Equals(other.MaximumRate)
                 ));
        }
        /// <summary>
        /// Returns true if UnarrangedAccountOverdraftRate instances are equal
        /// </summary>
        /// <param name="other">Instance of UnarrangedAccountOverdraftRate to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(UnarrangedAccountOverdraftRate other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Fees == other.Fees ||
                     Fees != null &&
                     Fees.SequenceEqual(other.Fees)
                     ) &&
                 (
                     Applications == other.Applications ||
                     Applications != null &&
                     Applications.SequenceEqual(other.Applications)
                 ) &&
                 (
                     MinimumRate == other.MinimumRate ||
                     MinimumRate != null &&
                     MinimumRate.Equals(other.MinimumRate)
                 ) &&
                 (
                     MaximumRate == other.MaximumRate ||
                     MaximumRate != null &&
                     MaximumRate.Equals(other.MaximumRate)
                 ) &&
                 (
                     Customers == other.Customers ||
                     Customers != null &&
                     Customers.SequenceEqual(other.Customers)
                 ));
        }