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

            return
                ((
                     AccountId == other.AccountId ||
                     AccountId != null &&
                     AccountId.Equals(other.AccountId)
                     ) &&
                 (
                     TransactionId == other.TransactionId ||
                     TransactionId != null &&
                     TransactionId.Equals(other.TransactionId)
                 ) &&
                 (
                     IsDetailAvailable == other.IsDetailAvailable ||
                     IsDetailAvailable != null &&
                     IsDetailAvailable.Equals(other.IsDetailAvailable)
                 ) &&
                 (
                     Type == other.Type ||
                     Type != null &&
                     Type.Equals(other.Type)
                 ) &&
                 (
                     Status == other.Status ||
                     Status != null &&
                     Status.Equals(other.Status)
                 ) &&
                 (
                     Description == other.Description ||
                     Description != null &&
                     Description.Equals(other.Description)
                 ) &&
                 (
                     PostingDateTime == other.PostingDateTime ||
                     PostingDateTime != null &&
                     PostingDateTime.Equals(other.PostingDateTime)
                 ) &&
                 (
                     ValueDateTime == other.ValueDateTime ||
                     ValueDateTime != null &&
                     ValueDateTime.Equals(other.ValueDateTime)
                 ) &&
                 (
                     ExecutionDateTime == other.ExecutionDateTime ||
                     ExecutionDateTime != null &&
                     ExecutionDateTime.Equals(other.ExecutionDateTime)
                 ) &&
                 (
                     Amount == other.Amount ||
                     Amount != null &&
                     Amount.Equals(other.Amount)
                 ) &&
                 (
                     Currency == other.Currency ||
                     Currency != null &&
                     Currency.Equals(other.Currency)
                 ) &&
                 (
                     Reference == other.Reference ||
                     Reference != null &&
                     Reference.Equals(other.Reference)
                 ) &&
                 (
                     MerchantName == other.MerchantName ||
                     MerchantName != null &&
                     MerchantName.Equals(other.MerchantName)
                 ) &&
                 (
                     MerchantCategoryCode == other.MerchantCategoryCode ||
                     MerchantCategoryCode != null &&
                     MerchantCategoryCode.Equals(other.MerchantCategoryCode)
                 ) &&
                 (
                     BillerCode == other.BillerCode ||
                     BillerCode != null &&
                     BillerCode.Equals(other.BillerCode)
                 ) &&
                 (
                     BillerName == other.BillerName ||
                     BillerName != null &&
                     BillerName.Equals(other.BillerName)
                 ) &&
                 (
                     Crn == other.Crn ||
                     Crn != null &&
                     Crn.Equals(other.Crn)
                 ) &&
                 (
                     ApcaNumber == other.ApcaNumber ||
                     ApcaNumber != null &&
                     ApcaNumber.Equals(other.ApcaNumber)
                 ));
        }