public override int GetHashCode() { unchecked // Overflow is fine, just wrap { int hashCode = 41; if (Type != null) { hashCode = hashCode * 59 + Type.GetHashCode(); } if (Visible != null) { hashCode = hashCode * 59 + Visible.GetHashCode(); } if (ShowLegend != null) { hashCode = hashCode * 59 + ShowLegend.GetHashCode(); } if (LegendGroup != null) { hashCode = hashCode * 59 + LegendGroup.GetHashCode(); } if (Opacity != null) { hashCode = hashCode * 59 + Opacity.GetHashCode(); } if (Name != null) { hashCode = hashCode * 59 + Name.GetHashCode(); } if (UId != null) { hashCode = hashCode * 59 + UId.GetHashCode(); } if (Ids != null) { hashCode = hashCode * 59 + Ids.GetHashCode(); } if (CustomData != null) { hashCode = hashCode * 59 + CustomData.GetHashCode(); } if (Meta != null) { hashCode = hashCode * 59 + Meta.GetHashCode(); } if (MetaArray != null) { hashCode = hashCode * 59 + MetaArray.GetHashCode(); } if (SelectedPoints != null) { hashCode = hashCode * 59 + SelectedPoints.GetHashCode(); } if (HoverInfo != null) { hashCode = hashCode * 59 + HoverInfo.GetHashCode(); } if (HoverInfoArray != null) { hashCode = hashCode * 59 + HoverInfoArray.GetHashCode(); } if (Stream != null) { hashCode = hashCode * 59 + Stream.GetHashCode(); } if (Transforms != null) { hashCode = hashCode * 59 + Transforms.GetHashCode(); } if (UiRevision != null) { hashCode = hashCode * 59 + UiRevision.GetHashCode(); } if (X != null) { hashCode = hashCode * 59 + X.GetHashCode(); } if (Open != null) { hashCode = hashCode * 59 + Open.GetHashCode(); } if (High != null) { hashCode = hashCode * 59 + High.GetHashCode(); } if (Low != null) { hashCode = hashCode * 59 + Low.GetHashCode(); } if (Close != null) { hashCode = hashCode * 59 + Close.GetHashCode(); } if (Line != null) { hashCode = hashCode * 59 + Line.GetHashCode(); } if (Increasing != null) { hashCode = hashCode * 59 + Increasing.GetHashCode(); } if (Decreasing != null) { hashCode = hashCode * 59 + Decreasing.GetHashCode(); } if (Text != null) { hashCode = hashCode * 59 + Text.GetHashCode(); } if (TextArray != null) { hashCode = hashCode * 59 + TextArray.GetHashCode(); } if (HoverText != null) { hashCode = hashCode * 59 + HoverText.GetHashCode(); } if (HoverTextArray != null) { hashCode = hashCode * 59 + HoverTextArray.GetHashCode(); } if (TickWidth != null) { hashCode = hashCode * 59 + TickWidth.GetHashCode(); } if (HoverLabel != null) { hashCode = hashCode * 59 + HoverLabel.GetHashCode(); } if (XCalendar != null) { hashCode = hashCode * 59 + XCalendar.GetHashCode(); } if (XAxis != null) { hashCode = hashCode * 59 + XAxis.GetHashCode(); } if (YAxis != null) { hashCode = hashCode * 59 + YAxis.GetHashCode(); } if (IdsSrc != null) { hashCode = hashCode * 59 + IdsSrc.GetHashCode(); } if (CustomDataSrc != null) { hashCode = hashCode * 59 + CustomDataSrc.GetHashCode(); } if (MetaSrc != null) { hashCode = hashCode * 59 + MetaSrc.GetHashCode(); } if (HoverInfoSrc != null) { hashCode = hashCode * 59 + HoverInfoSrc.GetHashCode(); } if (XSrc != null) { hashCode = hashCode * 59 + XSrc.GetHashCode(); } if (OpenSrc != null) { hashCode = hashCode * 59 + OpenSrc.GetHashCode(); } if (HighSrc != null) { hashCode = hashCode * 59 + HighSrc.GetHashCode(); } if (LowSrc != null) { hashCode = hashCode * 59 + LowSrc.GetHashCode(); } if (CloseSrc != null) { hashCode = hashCode * 59 + CloseSrc.GetHashCode(); } if (TextSrc != null) { hashCode = hashCode * 59 + TextSrc.GetHashCode(); } if (HoverTextSrc != null) { hashCode = hashCode * 59 + HoverTextSrc.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((Low.GetHashCode() * 397) ^ High.GetHashCode()); } }
/// <inheritdoc /> public override int GetHashCode() { return(HashCode.Combine( Low != null ? Low.GetHashCode() : 0, High != null ? High.GetHashCode() : 0)); }
/// <inheritdoc/> public override int GetHashCode() { return(Low.GetHashCode() ^ High.GetHashCode()); }
public override int GetHashCode() { unchecked { //TODO extract the constants to a separate file // Choose large primes to avoid hashing collisions const int HashingBase = (int)2166136261; const int HashingMultiplier = 16777619; int hash = HashingBase; hash = (hash * HashingMultiplier) ^ (!Object.ReferenceEquals(null, Low) ? Low.GetHashCode() : 0); hash = (hash * HashingMultiplier) ^ (!Object.ReferenceEquals(null, High) ? High.GetHashCode() : 0); return(hash); } }
/// <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); } }