Пример #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 (PaymentProduct1503SpecificInput != null)
         {
             hashCode = hashCode * 59 + PaymentProduct1503SpecificInput.GetHashCode();
         }
         if (PaymentProduct1504SpecificInput != null)
         {
             hashCode = hashCode * 59 + PaymentProduct1504SpecificInput.GetHashCode();
         }
         return(hashCode);
     }
 }
Пример #2
0
        /// <summary>
        /// Returns true if CashPaymentMethodSpecificInput instances are equal
        /// </summary>
        /// <param name="other">Instance of CashPaymentMethodSpecificInput to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(CashPaymentMethodSpecificInput other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     PaymentProduct1503SpecificInput == other.PaymentProduct1503SpecificInput ||
                     PaymentProduct1503SpecificInput != null &&
                     PaymentProduct1503SpecificInput.Equals(other.PaymentProduct1503SpecificInput)
                     ) &&
                 (
                     PaymentProduct1504SpecificInput == other.PaymentProduct1504SpecificInput ||
                     PaymentProduct1504SpecificInput != null &&
                     PaymentProduct1504SpecificInput.Equals(other.PaymentProduct1504SpecificInput)
                 ));
        }