Пример #1
0
        /// <summary>
        /// Returns true if NonSepaDirectDebitPaymentMethodSpecificInput instances are equal
        /// </summary>
        /// <param name="other">Instance of NonSepaDirectDebitPaymentMethodSpecificInput to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(NonSepaDirectDebitPaymentMethodSpecificInput other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     DateCollect == other.DateCollect ||
                     DateCollect != null &&
                     DateCollect.Equals(other.DateCollect)
                     ) &&
                 (
                     DirectDebitText == other.DirectDebitText ||
                     DirectDebitText != null &&
                     DirectDebitText.Equals(other.DirectDebitText)
                 ) &&
                 (
                     IsRecurring == other.IsRecurring ||
                     IsRecurring != null &&
                     IsRecurring.Equals(other.IsRecurring)
                 ) &&
                 (
                     PaymentProduct705SpecificInput == other.PaymentProduct705SpecificInput ||
                     PaymentProduct705SpecificInput != null &&
                     PaymentProduct705SpecificInput.Equals(other.PaymentProduct705SpecificInput)
                 ) &&
                 (
                     PaymentProduct730SpecificInput == other.PaymentProduct730SpecificInput ||
                     PaymentProduct730SpecificInput != null &&
                     PaymentProduct730SpecificInput.Equals(other.PaymentProduct730SpecificInput)
                 ) &&
                 (
                     RecurringPaymentSequenceIndicator == other.RecurringPaymentSequenceIndicator ||
                     RecurringPaymentSequenceIndicator != null &&
                     RecurringPaymentSequenceIndicator.Equals(other.RecurringPaymentSequenceIndicator)
                 ) &&
                 (
                     Token == other.Token ||
                     Token != null &&
                     Token.Equals(other.Token)
                 ) &&
                 (
                     Tokenize == other.Tokenize ||
                     Tokenize != null &&
                     Tokenize.Equals(other.Tokenize)
                 ));
        }
Пример #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 (DateCollect != null)
         {
             hashCode = hashCode * 59 + DateCollect.GetHashCode();
         }
         if (DirectDebitText != null)
         {
             hashCode = hashCode * 59 + DirectDebitText.GetHashCode();
         }
         if (IsRecurring != null)
         {
             hashCode = hashCode * 59 + IsRecurring.GetHashCode();
         }
         if (PaymentProduct705SpecificInput != null)
         {
             hashCode = hashCode * 59 + PaymentProduct705SpecificInput.GetHashCode();
         }
         if (PaymentProduct730SpecificInput != null)
         {
             hashCode = hashCode * 59 + PaymentProduct730SpecificInput.GetHashCode();
         }
         if (RecurringPaymentSequenceIndicator != null)
         {
             hashCode = hashCode * 59 + RecurringPaymentSequenceIndicator.GetHashCode();
         }
         if (Token != null)
         {
             hashCode = hashCode * 59 + Token.GetHashCode();
         }
         if (Tokenize != null)
         {
             hashCode = hashCode * 59 + Tokenize.GetHashCode();
         }
         return(hashCode);
     }
 }