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

            return
                ((
                     IsRecurring == other.IsRecurring ||
                     IsRecurring != null &&
                     IsRecurring.Equals(other.IsRecurring)
                     ) &&
                 (
                     Locale == other.Locale ||
                     Locale != null &&
                     Locale.Equals(other.Locale)
                 ) &&
                 (
                     PaymentProductFilters == other.PaymentProductFilters ||
                     PaymentProductFilters != null &&
                     PaymentProductFilters.Equals(other.PaymentProductFilters)
                 ) &&
                 (
                     ReturnCancelState == other.ReturnCancelState ||
                     ReturnCancelState != null &&
                     ReturnCancelState.Equals(other.ReturnCancelState)
                 ) &&
                 (
                     ReturnUrl == other.ReturnUrl ||
                     ReturnUrl != null &&
                     ReturnUrl.Equals(other.ReturnUrl)
                 ) &&
                 (
                     ShowResultPage == other.ShowResultPage ||
                     ShowResultPage != null &&
                     ShowResultPage.Equals(other.ShowResultPage)
                 ) &&
                 (
                     Tokens == other.Tokens ||
                     Tokens != null &&
                     Tokens.Equals(other.Tokens)
                 ) &&
                 (
                     ValidateShoppingCart == other.ValidateShoppingCart ||
                     ValidateShoppingCart != null &&
                     ValidateShoppingCart.Equals(other.ValidateShoppingCart)
                 ) &&
                 (
                     Variant == other.Variant ||
                     Variant != null &&
                     Variant.Equals(other.Variant)
                 ));
        }
Example #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 (IsRecurring != null)
         {
             hashCode = hashCode * 59 + IsRecurring.GetHashCode();
         }
         if (Locale != null)
         {
             hashCode = hashCode * 59 + Locale.GetHashCode();
         }
         if (PaymentProductFilters != null)
         {
             hashCode = hashCode * 59 + PaymentProductFilters.GetHashCode();
         }
         if (ReturnCancelState != null)
         {
             hashCode = hashCode * 59 + ReturnCancelState.GetHashCode();
         }
         if (ReturnUrl != null)
         {
             hashCode = hashCode * 59 + ReturnUrl.GetHashCode();
         }
         if (ShowResultPage != null)
         {
             hashCode = hashCode * 59 + ShowResultPage.GetHashCode();
         }
         if (Tokens != null)
         {
             hashCode = hashCode * 59 + Tokens.GetHashCode();
         }
         if (ValidateShoppingCart != null)
         {
             hashCode = hashCode * 59 + ValidateShoppingCart.GetHashCode();
         }
         if (Variant != null)
         {
             hashCode = hashCode * 59 + Variant.GetHashCode();
         }
         return(hashCode);
     }
 }