18 using System.Collections.Generic;
21 using System.Collections;
38 private bool _needNewCurrent;
39 private DateTime _lastEmitTime;
52 _subscriptionRequest = subscriptionRequest;
53 _universeProvider = universeProvider;
54 _timeProvider = timeProvider;
56 _needNewCurrent =
true;
67 object IEnumerator.Current =>
Current;
87 _needNewCurrent = _timeProvider.GetUtcNow().ConvertFromUtc(_subscriptionRequest.Configuration.ExchangeTimeZone).Date != _lastEmitTime.Date;
92 if (!_universeProvider.CanPerformSelection())
98 var localTime = _timeProvider.GetUtcNow()
99 .ConvertFromUtc(_subscriptionRequest.Configuration.ExchangeTimeZone)
100 .RoundDown(_subscriptionRequest.Configuration.Increment);
103 var symbols = _universeProvider.LookupSymbols(_subscriptionRequest.Security.Symbol,
false);
113 _lastEmitTime = localTime;
115 Log.
Trace($
"DataQueueFuturesChainUniverseDataCollectionEnumerator({current.Symbol}): Emitting data point: {current.EndTime}. Count: {current.Data.Count}");
118 _needNewCurrent =
false;
133 _needNewCurrent =
true;