public override int GetHashCode() { unchecked { var hashCode = WeightedAveragePrice.GetHashCode(); hashCode = (hashCode * 397) ^ MedianPrice.GetHashCode(); hashCode = (hashCode * 397) ^ WeightedMedianAveragePrice.GetHashCode(); hashCode = (hashCode * 397) ^ (BaseAssetId != null ? BaseAssetId.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (QuoteAssetId != null ? QuoteAssetId.GetHashCode() : 0); //hashCode = (hashCode * 397) ^ Timestamp.GetHashCode(); return(hashCode); } }
public bool Equals(ExchangeRate other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (WeightedAveragePrice.Equals(other.WeightedAveragePrice) && MedianPrice.Equals(other.MedianPrice) && WeightedMedianAveragePrice.Equals(other.WeightedMedianAveragePrice) && string.Equals(BaseAssetId, other.BaseAssetId) && string.Equals(QuoteAssetId, other.QuoteAssetId) /* && * Timestamp.Equals(other.Timestamp)*/); }