Пример #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);
     }
 }
Пример #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);
     }
 }