/// <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 :) hashCode = hashCode * 59 + QuoteCurrency.GetHashCode(); hashCode = hashCode * 59 + Kind.GetHashCode(); if (TickSize != null) { hashCode = hashCode * 59 + TickSize.GetHashCode(); } if (ContractSize != null) { hashCode = hashCode * 59 + ContractSize.GetHashCode(); } if (IsActive != null) { hashCode = hashCode * 59 + IsActive.GetHashCode(); } hashCode = hashCode * 59 + OptionType.GetHashCode(); if (MinTradeAmount != null) { hashCode = hashCode * 59 + MinTradeAmount.GetHashCode(); } if (InstrumentName != null) { hashCode = hashCode * 59 + InstrumentName.GetHashCode(); } hashCode = hashCode * 59 + SettlementPeriod.GetHashCode(); if (Strike != null) { hashCode = hashCode * 59 + Strike.GetHashCode(); } hashCode = hashCode * 59 + BaseCurrency.GetHashCode(); if (CreationTimestamp != null) { hashCode = hashCode * 59 + CreationTimestamp.GetHashCode(); } if (ExpirationTimestamp != null) { hashCode = hashCode * 59 + ExpirationTimestamp.GetHashCode(); } return(hashCode); } }
/// <summary>Returns the hash code for this instance.</summary> /// <returns>A 32-bit signed integer that is the hash code for this instance.</returns> public override int GetHashCode() { unchecked { return(Value.GetHashCode() + (397 * BaseCurrency.GetHashCode()) + (397 * QuoteCurrency.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); } }