示例#1
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = StockId.GetHashCode();
         hashCode = (hashCode * 397) ^ BidPrice.GetHashCode();
         hashCode = (hashCode * 397) ^ BidQuantity.GetHashCode();
         hashCode = (hashCode * 397) ^ OrderId.GetHashCode();
         return(hashCode);
     }
 }
示例#2
0
 public override Int32 GetHashCode()
 {
     unchecked
     {
         var hashCode = BidExchange.GetHashCode();
         hashCode = (hashCode * 397) ^ AskExchange.GetHashCode();
         hashCode = (hashCode * 397) ^ BidPrice.GetHashCode();
         hashCode = (hashCode * 397) ^ AskPrice.GetHashCode();
         hashCode = (hashCode * 397) ^ BidSize.GetHashCode();
         hashCode = (hashCode * 397) ^ AskSize.GetHashCode();
         hashCode = (hashCode * 397) ^ Timestamp.GetHashCode();
         return(hashCode);
     }
 }
 public override int GetHashCode()
 {
     return(Symbol.GetHashCode() ^ AskPrice.GetHashCode() ^ BidPrice.GetHashCode() ^ AskQty.GetHashCode() ^ BidQty.GetHashCode());
 }
 /// <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 (UnderlyingIndex != null)
         {
             hashCode = hashCode * 59 + UnderlyingIndex.GetHashCode();
         }
         if (Volume != null)
         {
             hashCode = hashCode * 59 + Volume.GetHashCode();
         }
         if (VolumeUsd != null)
         {
             hashCode = hashCode * 59 + VolumeUsd.GetHashCode();
         }
         if (UnderlyingPrice != null)
         {
             hashCode = hashCode * 59 + UnderlyingPrice.GetHashCode();
         }
         if (BidPrice != null)
         {
             hashCode = hashCode * 59 + BidPrice.GetHashCode();
         }
         if (OpenInterest != null)
         {
             hashCode = hashCode * 59 + OpenInterest.GetHashCode();
         }
         if (QuoteCurrency != null)
         {
             hashCode = hashCode * 59 + QuoteCurrency.GetHashCode();
         }
         if (High != null)
         {
             hashCode = hashCode * 59 + High.GetHashCode();
         }
         if (EstimatedDeliveryPrice != null)
         {
             hashCode = hashCode * 59 + EstimatedDeliveryPrice.GetHashCode();
         }
         if (Last != null)
         {
             hashCode = hashCode * 59 + Last.GetHashCode();
         }
         if (MidPrice != null)
         {
             hashCode = hashCode * 59 + MidPrice.GetHashCode();
         }
         if (InterestRate != null)
         {
             hashCode = hashCode * 59 + InterestRate.GetHashCode();
         }
         if (Funding8h != null)
         {
             hashCode = hashCode * 59 + Funding8h.GetHashCode();
         }
         if (MarkPrice != null)
         {
             hashCode = hashCode * 59 + MarkPrice.GetHashCode();
         }
         if (AskPrice != null)
         {
             hashCode = hashCode * 59 + AskPrice.GetHashCode();
         }
         if (InstrumentName != null)
         {
             hashCode = hashCode * 59 + InstrumentName.GetHashCode();
         }
         if (Low != null)
         {
             hashCode = hashCode * 59 + Low.GetHashCode();
         }
         if (BaseCurrency != null)
         {
             hashCode = hashCode * 59 + BaseCurrency.GetHashCode();
         }
         if (CreationTimestamp != null)
         {
             hashCode = hashCode * 59 + CreationTimestamp.GetHashCode();
         }
         if (CurrentFunding != null)
         {
             hashCode = hashCode * 59 + CurrentFunding.GetHashCode();
         }
         return(hashCode);
     }
 }