public static void MergeCandles(this CandleTableEntity entity, IEnumerable <CandleItem> candles, TimeInterval interval) { foreach (var candle in candles) { entity.MergeCandle(candle, interval); } }
public static void MergeCandle(this CandleTableEntity entity, CandleItem candle, TimeInterval interval) { if (entity == null) { throw new ArgumentNullException(nameof(entity)); } IFeedCandle fc = candle.ToCandle(entity.IsBuy, entity.DateTime, interval); entity.MergeCandle(fc, interval); }