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 (NavByAccounts != null)
         {
             hashCode = hashCode * 59 + NavByAccounts.GetHashCode();
         }
         if (ExchangeRates != null)
         {
             hashCode = hashCode * 59 + ExchangeRates.GetHashCode();
         }
         return(hashCode);
     }
 }
Exemplo n.º 2
0
        /// <summary>
        /// Returns true if CashLockedUpWithdrawableRequest instances are equal
        /// </summary>
        /// <param name="other">Instance of CashLockedUpWithdrawableRequest to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(CashLockedUpWithdrawableRequest other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     NavByAccounts == other.NavByAccounts ||
                     NavByAccounts != null &&
                     NavByAccounts.Equals(other.NavByAccounts)
                     ) &&
                 (
                     ExchangeRates == other.ExchangeRates ||
                     ExchangeRates != null &&
                     ExchangeRates.Equals(other.ExchangeRates)
                 ));
        }