public override int GetHashCode() { unchecked { var hashCode = AssetPairId != null ? AssetPairId.GetHashCode() : 0; hashCode = (hashCode * 397) ^ (int)PriceType; hashCode = (hashCode * 397) ^ (int)TimeInterval; hashCode = (hashCode * 397) ^ Timestamp.GetHashCode(); hashCode = (hashCode * 397) ^ LatestChangeTimestamp.GetHashCode(); hashCode = (hashCode * 397) ^ Open.GetHashCode(); hashCode = (hashCode * 397) ^ Close.GetHashCode(); hashCode = (hashCode * 397) ^ High.GetHashCode(); hashCode = (hashCode * 397) ^ Low.GetHashCode(); hashCode = (hashCode * 397) ^ TradingVolume.GetHashCode(); hashCode = (hashCode * 397) ^ TradingOppositeVolume.GetHashCode(); return hashCode; } }
public bool Equals(Candle other) { if (ReferenceEquals(null, other)) { return false; } if (ReferenceEquals(this, other)) { return true; } return string.Equals(AssetPairId, other.AssetPairId) && PriceType == other.PriceType && TimeInterval == other.TimeInterval && Timestamp.Equals(other.Timestamp) && LatestChangeTimestamp.Equals(other.LatestChangeTimestamp) && Open.Equals(other.Open) && Close.Equals(other.Close) && High.Equals(other.High) && Low.Equals(other.Low) && TradingVolume.Equals(other.TradingVolume) && TradingOppositeVolume.Equals(other.TradingOppositeVolume); }