Exemple #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 (EntityId != null)
         {
             hashCode = hashCode * 59 + EntityId.GetHashCode();
         }
         if (TrustAccountId != null)
         {
             hashCode = hashCode * 59 + TrustAccountId.GetHashCode();
         }
         if (Currency != null)
         {
             hashCode = hashCode * 59 + Currency.GetHashCode();
         }
         if (Amount != null)
         {
             hashCode = hashCode * 59 + Amount.GetHashCode();
         }
         if (LockedUpUntil != null)
         {
             hashCode = hashCode * 59 + LockedUpUntil.GetHashCode();
         }
         if (Reference != null)
         {
             hashCode = hashCode * 59 + Reference.GetHashCode();
         }
         return(hashCode);
     }
 }
Exemple #2
0
        /// <summary>
        /// Returns true if CashLockedUpRequest instances are equal
        /// </summary>
        /// <param name="other">Instance of CashLockedUpRequest to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(CashLockedUpRequest other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     EntityId == other.EntityId ||
                     EntityId != null &&
                     EntityId.Equals(other.EntityId)
                     ) &&
                 (
                     TrustAccountId == other.TrustAccountId ||
                     TrustAccountId != null &&
                     TrustAccountId.Equals(other.TrustAccountId)
                 ) &&
                 (
                     Currency == other.Currency ||
                     Currency != null &&
                     Currency.Equals(other.Currency)
                 ) &&
                 (
                     Amount == other.Amount ||
                     Amount != null &&
                     Amount.Equals(other.Amount)
                 ) &&
                 (
                     LockedUpUntil == other.LockedUpUntil ||
                     LockedUpUntil != null &&
                     LockedUpUntil.Equals(other.LockedUpUntil)
                 ) &&
                 (
                     Reference == other.Reference ||
                     Reference != null &&
                     Reference.Equals(other.Reference)
                 ));
        }