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

            return
                ((
                     Id == other.Id ||
                     Id != null &&
                     Id.Equals(other.Id)
                     ) &&
                 (
                     TrustAccountId == other.TrustAccountId ||
                     TrustAccountId != null &&
                     TrustAccountId.Equals(other.TrustAccountId)
                 ) &&
                 (
                     Currency == other.Currency ||
                     Currency != null &&
                     Currency.Equals(other.Currency)
                 ) &&
                 (
                     RateOfExchange == other.RateOfExchange ||
                     RateOfExchange != null &&
                     RateOfExchange.Equals(other.RateOfExchange)
                 ) &&
                 (
                     Amount == other.Amount ||
                     Amount != null &&
                     Amount.Equals(other.Amount)
                 ) &&
                 (
                     AmountAtRateOfExchange == other.AmountAtRateOfExchange ||
                     AmountAtRateOfExchange != null &&
                     AmountAtRateOfExchange.Equals(other.AmountAtRateOfExchange)
                 ) &&
                 (
                     LockUpDate == other.LockUpDate ||
                     LockUpDate != null &&
                     LockUpDate.Equals(other.LockUpDate)
                 ));
        }
コード例 #2
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 (Id != null)
         {
             hashCode = hashCode * 59 + Id.GetHashCode();
         }
         if (TrustAccountId != null)
         {
             hashCode = hashCode * 59 + TrustAccountId.GetHashCode();
         }
         if (Currency != null)
         {
             hashCode = hashCode * 59 + Currency.GetHashCode();
         }
         if (RateOfExchange != null)
         {
             hashCode = hashCode * 59 + RateOfExchange.GetHashCode();
         }
         if (Amount != null)
         {
             hashCode = hashCode * 59 + Amount.GetHashCode();
         }
         if (AmountAtRateOfExchange != null)
         {
             hashCode = hashCode * 59 + AmountAtRateOfExchange.GetHashCode();
         }
         if (LockUpDate != null)
         {
             hashCode = hashCode * 59 + LockUpDate.GetHashCode();
         }
         return(hashCode);
     }
 }