17 using System.Collections.Generic;
19 using System.Threading;
38 private int _dataPointCount;
56 var frontier = DateTime.MinValue;
58 var universeSelectionData =
new Dictionary<Universe, BaseDataCollection>();
62 var earlyBirdTicks =
long.MaxValue;
63 var data =
new List<DataFeedPacket>();
64 foreach (var subscription
in subscriptions.Where(subscription => !subscription.EndOfStream))
66 if (subscription.Current ==
null && !subscription.MoveNext())
74 while (subscription.Current.EmitTimeUtc <= frontier)
79 packet =
new DataFeedPacket(subscription.Security, subscription.Configuration);
85 packet.
Add(subscription.Current.Data);
86 Interlocked.Increment(ref _dataPointCount);
87 if (!subscription.MoveNext())
93 if (subscription.Current !=
null)
96 earlyBirdTicks = Math.Min(earlyBirdTicks, subscription.Current.EmitTimeUtc.Ticks);
103 yield
return timeSliceFactory.Create(frontier, data,
SecurityChanges.
None, universeSelectionData).Slice;
107 if (earlyBirdTicks ==
long.MaxValue)
break;
109 frontier =
new DateTime(Math.Max(earlyBirdTicks, frontier.Ticks), DateTimeKind.Utc);
113 foreach (var subscription
in subscriptions)
115 subscription.Dispose();
124 var config = request.ToSubscriptionDataConfig();
135 var reader = history.GetEnumerator();
138 if (useDailyStrictEndTimes)