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

            return
                ((
                     Title == other.Title ||
                     Title != null &&
                     Title.Equals(other.Title)
                     ) &&
                 (
                     Items == other.Items ||
                     Items != null &&
                     Items.SequenceEqual(other.Items)
                 ) &&
                 (
                     Facts == other.Facts ||
                     Facts != null &&
                     Facts.SequenceEqual(other.Facts)
                 ) &&
                 (
                     Tap == other.Tap ||
                     Tap != null &&
                     Tap.Equals(other.Tap)
                 ) &&
                 (
                     Total == other.Total ||
                     Total != null &&
                     Total.Equals(other.Total)
                 ) &&
                 (
                     Tax == other.Tax ||
                     Tax != null &&
                     Tax.Equals(other.Tax)
                 ) &&
                 (
                     Vat == other.Vat ||
                     Vat != null &&
                     Vat.Equals(other.Vat)
                 ) &&
                 (
                     Buttons == other.Buttons ||
                     Buttons != null &&
                     Buttons.SequenceEqual(other.Buttons)
                 ));
        }