Exemplo n.º 1
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 (FirstName != null)
         {
             hashCode = hashCode * 59 + FirstName.GetHashCode();
         }
         if (LastName != null)
         {
             hashCode = hashCode * 59 + LastName.GetHashCode();
         }
         if (CompanyName != null)
         {
             hashCode = hashCode * 59 + CompanyName.GetHashCode();
         }
         if (DepartmentDocumentNumber != null)
         {
             hashCode = hashCode * 59 + DepartmentDocumentNumber.GetHashCode();
         }
         if (CheckNumber != null)
         {
             hashCode = hashCode * 59 + CheckNumber.GetHashCode();
         }
         if (CheckAmount != null)
         {
             hashCode = hashCode * 59 + CheckAmount.GetHashCode();
         }
         if (CheckDate != null)
         {
             hashCode = hashCode * 59 + CheckDate.GetHashCode();
         }
         if (TransmittalNumber != null)
         {
             hashCode = hashCode * 59 + TransmittalNumber.GetHashCode();
         }
         if (TransmittalStatus != null)
         {
             hashCode = hashCode * 59 + TransmittalStatus.GetHashCode();
         }
         if (DepositNumber != null)
         {
             hashCode = hashCode * 59 + DepositNumber.GetHashCode();
         }
         if (CashListing != null)
         {
             hashCode = hashCode * 59 + CashListing.GetHashCode();
         }
         return(hashCode);
     }
 }
Exemplo n.º 2
0
        /// <summary>
        /// Returns true if DepartmentDocumentSearchResponse instances are equal
        /// </summary>
        /// <param name="other">Instance of DepartmentDocumentSearchResponse to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(DepartmentDocumentSearchResponse other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     FirstName == other.FirstName ||
                     FirstName != null &&
                     FirstName.Equals(other.FirstName)
                     ) &&
                 (
                     LastName == other.LastName ||
                     LastName != null &&
                     LastName.Equals(other.LastName)
                 ) &&
                 (
                     CompanyName == other.CompanyName ||
                     CompanyName != null &&
                     CompanyName.Equals(other.CompanyName)
                 ) &&
                 (
                     DepartmentDocumentNumber == other.DepartmentDocumentNumber ||
                     DepartmentDocumentNumber != null &&
                     DepartmentDocumentNumber.Equals(other.DepartmentDocumentNumber)
                 ) &&
                 (
                     CheckNumber == other.CheckNumber ||
                     CheckNumber != null &&
                     CheckNumber.Equals(other.CheckNumber)
                 ) &&
                 (
                     CheckAmount == other.CheckAmount ||
                     CheckAmount != null &&
                     CheckAmount.Equals(other.CheckAmount)
                 ) &&
                 (
                     CheckDate == other.CheckDate ||
                     CheckDate != null &&
                     CheckDate.Equals(other.CheckDate)
                 ) &&
                 (
                     TransmittalNumber == other.TransmittalNumber ||
                     TransmittalNumber != null &&
                     TransmittalNumber.Equals(other.TransmittalNumber)
                 ) &&
                 (
                     TransmittalStatus == other.TransmittalStatus ||
                     TransmittalStatus != null &&
                     TransmittalStatus.Equals(other.TransmittalStatus)
                 ) &&
                 (
                     DepositNumber == other.DepositNumber ||
                     DepositNumber != null &&
                     DepositNumber.Equals(other.DepositNumber)
                 ) &&
                 (
                     CashListing == other.CashListing ||
                     CashListing != null &&
                     CashListing.Equals(other.CashListing)
                 ));
        }
        /// <summary>
        /// Returns true if DepartmentDocumentSearchRequest instances are equal
        /// </summary>
        /// <param name="other">Instance of DepartmentDocumentSearchRequest to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(DepartmentDocumentSearchRequest other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     FirstName == other.FirstName ||
                     FirstName != null &&
                     FirstName.Equals(other.FirstName)
                     ) &&
                 (
                     LastName == other.LastName ||
                     LastName != null &&
                     LastName.Equals(other.LastName)
                 ) &&
                 (
                     CompanyName == other.CompanyName ||
                     CompanyName != null &&
                     CompanyName.Equals(other.CompanyName)
                 ) &&
                 (
                     DepartmentDocumentNumber == other.DepartmentDocumentNumber ||
                     DepartmentDocumentNumber != null &&
                     DepartmentDocumentNumber.Equals(other.DepartmentDocumentNumber)
                 ) &&
                 (
                     DdnSearchType == other.DdnSearchType ||
                     DdnSearchType != null &&
                     DdnSearchType.Equals(other.DdnSearchType)
                 ) &&
                 (
                     CheckNumber == other.CheckNumber ||
                     CheckNumber != null &&
                     CheckNumber.Equals(other.CheckNumber)
                 ) &&
                 (
                     DepositNumber == other.DepositNumber ||
                     DepositNumber != null &&
                     DepositNumber.Equals(other.DepositNumber)
                 ) &&
                 (
                     TransmittalNumber == other.TransmittalNumber ||
                     TransmittalNumber != null &&
                     TransmittalNumber.Equals(other.TransmittalNumber)
                 ) &&
                 (
                     TransmittalStatus == other.TransmittalStatus ||
                     TransmittalStatus != null &&
                     TransmittalStatus.Equals(other.TransmittalStatus)
                 ) &&
                 (
                     CheckAmount == other.CheckAmount ||
                     CheckAmount != null &&
                     CheckAmount.Equals(other.CheckAmount)
                 ) &&
                 (
                     CashListing == other.CashListing ||
                     CashListing != null &&
                     CashListing.Equals(other.CashListing)
                 ) &&
                 (
                     EoCode == other.EoCode ||
                     EoCode != null &&
                     EoCode.Equals(other.EoCode)
                 ) &&
                 (
                     ObjectCode == other.ObjectCode ||
                     ObjectCode != null &&
                     ObjectCode.Equals(other.ObjectCode)
                 ) &&
                 (
                     DepositDateFrom == other.DepositDateFrom ||
                     DepositDateFrom != null &&
                     DepositDateFrom.Equals(other.DepositDateFrom)
                 ) &&
                 (
                     DepositDateTo == other.DepositDateTo ||
                     DepositDateTo != null &&
                     DepositDateTo.Equals(other.DepositDateTo)
                 ));
        }