18 using System.Collections.Generic;
41 private Cash _nullCash;
48 private bool _parallelHistoryRequestsEnabled;
49 private bool _initialized;
65 throw new InvalidOperationException(
"SubscriptionDataReaderHistoryProvider can only be initialized once");
88 public override IEnumerable<Slice>
GetHistory(IEnumerable<HistoryRequest> requests, DateTimeZone sliceTimeZone)
91 var subscriptions =
new List<Subscription>();
92 foreach (var request
in requests)
94 var subscription = CreateSubscription(request);
95 subscriptions.Add(subscription);
106 var config = request.ToSubscriptionDataConfig();
114 _nullSymbolProperties,
134 IEnumerator<BaseData> reader = dataReader;
136 if (intraday !=
null)
143 if (useDailyStrictEndTimes)
181 var timeBasedFilter =
new TimeBasedFilter(request);
186 if (_parallelHistoryRequestsEnabled)
204 private class TimeBasedFilter
206 public Type RequestedType {
get;
set; }
207 public DateTime EndTimeLocal {
get;
set; }
208 public DateTime StartTimeLocal {
get;
set; }
220 if (data.
EndTime > EndTimeLocal)
return false;
222 return data.
EndTime > StartTimeLocal;