Esempio n. 1
0
        public override int GetHashCode()
        {
            int hashCode = 1629433824;

            if (Id != null)
            {
                hashCode += Id.GetHashCode();
            }

            if (CheckoutPageUrl != null)
            {
                hashCode += CheckoutPageUrl.GetHashCode();
            }

            if (AskForShippingAddress != null)
            {
                hashCode += AskForShippingAddress.GetHashCode();
            }

            if (MerchantSupportEmail != null)
            {
                hashCode += MerchantSupportEmail.GetHashCode();
            }

            if (PrePopulateBuyerEmail != null)
            {
                hashCode += PrePopulateBuyerEmail.GetHashCode();
            }

            if (PrePopulateShippingAddress != null)
            {
                hashCode += PrePopulateShippingAddress.GetHashCode();
            }

            if (RedirectUrl != null)
            {
                hashCode += RedirectUrl.GetHashCode();
            }

            if (Order != null)
            {
                hashCode += Order.GetHashCode();
            }

            if (CreatedAt != null)
            {
                hashCode += CreatedAt.GetHashCode();
            }

            if (AdditionalRecipients != null)
            {
                hashCode += AdditionalRecipients.GetHashCode();
            }

            return(hashCode);
        }
Esempio n. 2
0
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }

            if (obj == this)
            {
                return(true);
            }

            return(obj is Checkout other &&
                   ((Id == null && other.Id == null) || (Id?.Equals(other.Id) == true)) &&
                   ((CheckoutPageUrl == null && other.CheckoutPageUrl == null) || (CheckoutPageUrl?.Equals(other.CheckoutPageUrl) == true)) &&
                   ((AskForShippingAddress == null && other.AskForShippingAddress == null) || (AskForShippingAddress?.Equals(other.AskForShippingAddress) == true)) &&
                   ((MerchantSupportEmail == null && other.MerchantSupportEmail == null) || (MerchantSupportEmail?.Equals(other.MerchantSupportEmail) == true)) &&
                   ((PrePopulateBuyerEmail == null && other.PrePopulateBuyerEmail == null) || (PrePopulateBuyerEmail?.Equals(other.PrePopulateBuyerEmail) == true)) &&
                   ((PrePopulateShippingAddress == null && other.PrePopulateShippingAddress == null) || (PrePopulateShippingAddress?.Equals(other.PrePopulateShippingAddress) == true)) &&
                   ((RedirectUrl == null && other.RedirectUrl == null) || (RedirectUrl?.Equals(other.RedirectUrl) == true)) &&
                   ((Order == null && other.Order == null) || (Order?.Equals(other.Order) == true)) &&
                   ((CreatedAt == null && other.CreatedAt == null) || (CreatedAt?.Equals(other.CreatedAt) == true)) &&
                   ((AdditionalRecipients == null && other.AdditionalRecipients == null) || (AdditionalRecipients?.Equals(other.AdditionalRecipients) == true)));
        }