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

            return
                ((
                     Id == other.Id ||
                     Id != null &&
                     Id.Equals(other.Id)
                     ) &&
                 (
                     CurrencyCode == other.CurrencyCode ||
                     CurrencyCode != null &&
                     CurrencyCode.Equals(other.CurrencyCode)
                 ) &&
                 (
                     Amount == other.Amount ||
                     Amount != null &&
                     Amount.Equals(other.Amount)
                 ) &&
                 (
                     CVC == other.CVC ||
                     CVC != null &&
                     CVC.Equals(other.CVC)
                 ) &&
                 (
                     CardNumber == other.CardNumber ||
                     CardNumber != null &&
                     CardNumber.Equals(other.CardNumber)
                 ) &&
                 (
                     FullName == other.FullName ||
                     FullName != null &&
                     FullName.Equals(other.FullName)
                 ) &&
                 (
                     CardExpiryDate == other.CardExpiryDate ||
                     CardExpiryDate != null &&
                     CardExpiryDate.Equals(other.CardExpiryDate)
                 ) &&
                 (
                     RequestDate == other.RequestDate ||
                     RequestDate != null &&
                     RequestDate.Equals(other.RequestDate)
                 ));
        }
コード例 #2
0
        protected bool Equals(CorrespondanceEntry other)
        {
            bool result = CurrencyCode != null && UserSettings != null;

            return(result && CurrencyCode.Equals(other.CurrencyCode) && UserSettings.Equals(other.UserSettings));
        }
コード例 #3
0
        /// <summary>
        /// Returns true if Item instances are equal
        /// </summary>
        /// <param name="other">Instance of Item to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(Item other)
        {
            if (other is null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Upc == other.Upc ||
                     Upc != null &&
                     Upc.Equals(other.Upc)
                     ) &&
                 (
                     Ean == other.Ean ||
                     Ean != null &&
                     Ean.Equals(other.Ean)
                 ) &&
                 (
                     Isbn == other.Isbn ||
                     Isbn != null &&
                     Isbn.Equals(other.Isbn)
                 ) &&
                 (
                     Asin == other.Asin ||
                     Asin != null &&
                     Asin.Equals(other.Asin)
                 ) &&
                 (
                     Title == other.Title ||
                     Title != null &&
                     Title.Equals(other.Title)
                 ) &&
                 (
                     Sku == other.Sku ||
                     Sku != null &&
                     Sku.Equals(other.Sku)
                 ) &&
                 (
                     Mpn == other.Mpn ||
                     Mpn != null &&
                     Mpn.Equals(other.Mpn)
                 ) &&
                 (
                     PartNumber == other.PartNumber ||
                     PartNumber != null &&
                     PartNumber.Equals(other.PartNumber)
                 ) &&
                 (
                     Upcs == other.Upcs ||
                     Upcs != null &&
                     other.Upcs != null &&
                     Upcs.SequenceEqual(other.Upcs)
                 ) &&
                 (
                     Description == other.Description ||
                     Description != null &&
                     Description.Equals(other.Description)
                 ) &&
                 (
                     Brand == other.Brand ||
                     Brand != null &&
                     Brand.Equals(other.Brand)
                 ) &&
                 (
                     Manufacturer == other.Manufacturer ||
                     Manufacturer != null &&
                     Manufacturer.Equals(other.Manufacturer)
                 ) &&
                 (
                     Color == other.Color ||
                     Color != null &&
                     Color.Equals(other.Color)
                 ) &&
                 (
                     NewPrice == other.NewPrice ||

                     NewPrice.Equals(other.NewPrice)
                 ) &&
                 (
                     UsedPrice == other.UsedPrice ||

                     UsedPrice.Equals(other.UsedPrice)
                 ) &&
                 (
                     CurrencyCode == other.CurrencyCode ||
                     CurrencyCode != null &&
                     CurrencyCode.Equals(other.CurrencyCode)
                 ) &&
                 (
                     Url == other.Url ||
                     Url != null &&
                     Url.Equals(other.Url)
                 ) &&
                 (
                     Features == other.Features ||
                     Features != null &&
                     other.Features != null &&
                     Features.SequenceEqual(other.Features)
                 ) &&
                 (
                     Dimensions == other.Dimensions ||
                     Dimensions != null &&
                     other.Dimensions != null &&
                     Dimensions.SequenceEqual(other.Dimensions)
                 ) &&
                 (
                     Images == other.Images ||
                     Images != null &&
                     other.Images != null &&
                     Images.SequenceEqual(other.Images)
                 ) &&
                 (
                     MatchedItems == other.MatchedItems ||
                     MatchedItems != null &&
                     other.MatchedItems != null &&
                     MatchedItems.SequenceEqual(other.MatchedItems)
                 ) &&
                 (
                     IsoCountryCodes == other.IsoCountryCodes ||
                     IsoCountryCodes != null &&
                     other.IsoCountryCodes != null &&
                     IsoCountryCodes.SequenceEqual(other.IsoCountryCodes)
                 ) &&
                 (
                     CompanyName == other.CompanyName ||
                     CompanyName != null &&
                     CompanyName.Equals(other.CompanyName)
                 ) &&
                 (
                     CompanyAddress == other.CompanyAddress ||
                     CompanyAddress != null &&
                     CompanyAddress.Equals(other.CompanyAddress)
                 ) &&
                 (
                     Categories == other.Categories ||
                     Categories != null &&
                     other.Categories != null &&
                     Categories.SequenceEqual(other.Categories)
                 ) &&
                 (
                     CategoryHierarchies == other.CategoryHierarchies ||
                     CategoryHierarchies != null &&
                     other.CategoryHierarchies != null &&
                     CategoryHierarchies.SequenceEqual(other.CategoryHierarchies)
                 ));
        }