18 using System.Collections.Generic;
44 DateTimeZone exchangeTimeZone)
46 if (dataDownloaderParameter ==
null)
48 throw new ArgumentNullException(nameof(dataDownloaderParameter));
52 && dataDownloaderParameter.
Symbol.RequiresMapping()
55 var yieldMappedSymbol =
default(
bool);
56 foreach (var symbolDateRange
in mapFileProvider.RetrieveAllMappedSymbolInDateRange(dataDownloaderParameter.
Symbol))
58 var startDateTimeUtc = symbolDateRange.StartDateTimeLocal.ConvertToUtc(exchangeTimeZone);
59 var endDateTimeUtc = symbolDateRange.EndDateTimeLocal.ConvertToUtc(exchangeTimeZone);
67 if (endDateTimeUtc < dataDownloaderParameter.
StartUtc)
72 if (startDateTimeUtc < dataDownloaderParameter.
StartUtc)
74 startDateTimeUtc = dataDownloaderParameter.
StartUtc;
78 if (endDateTimeUtc > dataDownloaderParameter.
EndUtc)
80 endDateTimeUtc = dataDownloaderParameter.
EndUtc;
84 symbolDateRange.Symbol, dataDownloaderParameter.
Resolution, startDateTimeUtc, endDateTimeUtc, dataDownloaderParameter.
TickType);
85 yieldMappedSymbol =
true;
88 if (!yieldMappedSymbol)
90 yield
return dataDownloaderParameter;
95 yield
return dataDownloaderParameter;