Lean
$LEAN_TAG$
|
Subscription data reader is a wrapper on the stream reader class to download, unpack and iterate over a data file. More...
Public Member Functions | |
SubscriptionDataReader (SubscriptionDataConfig config, BaseDataRequest dataRequest, IMapFileProvider mapFileProvider, IFactorFileProvider factorFileProvider, IDataCacheProvider dataCacheProvider, IDataProvider dataProvider, IObjectStore objectStore) | |
Subscription data reader takes a subscription request, loads the type, accepts the data source and enumerate on the results. More... | |
void | Initialize () |
Initializes the SubscriptionDataReader instance More... | |
bool | MoveNext () |
Advances the enumerator to the next element of the collection. More... | |
void | Reset () |
Reset the IEnumeration More... | |
void | Dispose () |
Dispose of the Stream Reader and close out the source stream and file connections. More... | |
Protected Member Functions | |
virtual void | OnInvalidConfigurationDetected (InvalidConfigurationDetectedEventArgs e) |
Event invocator for the InvalidConfigurationDetected event More... | |
virtual void | OnNumericalPrecisionLimited (NumericalPrecisionLimitedEventArgs e) |
Event invocator for the NumericalPrecisionLimited event More... | |
virtual void | OnStartDateLimited (StartDateLimitedEventArgs e) |
Event invocator for the StartDateLimited event More... | |
virtual void | OnDownloadFailed (DownloadFailedEventArgs e) |
Event invocator for the DownloadFailed event More... | |
virtual void | OnReaderErrorDetected (ReaderErrorDetectedEventArgs e) |
Event invocator for the ReaderErrorDetected event More... | |
virtual void | OnNewTradableDate (NewTradableDateEventArgs e) |
Event invocator for the NewTradableDate event More... | |
Properties | |
BaseData | Current [get] |
Last read BaseData object from this type and source More... | |
Events | |
EventHandler< InvalidConfigurationDetectedEventArgs > | InvalidConfigurationDetected |
Event fired when an invalid configuration has been detected More... | |
EventHandler< NumericalPrecisionLimitedEventArgs > | NumericalPrecisionLimited |
Event fired when the numerical precision in the factor file has been limited More... | |
EventHandler< StartDateLimitedEventArgs > | StartDateLimited |
Event fired when the start date has been limited More... | |
EventHandler< DownloadFailedEventArgs > | DownloadFailed |
Event fired when there was an error downloading a remote file More... | |
EventHandler< ReaderErrorDetectedEventArgs > | ReaderErrorDetected |
Event fired when there was an error reading the data More... | |
EventHandler< NewTradableDateEventArgs > | NewTradableDate |
Event fired when there is a new tradable date More... | |
Events inherited from QuantConnect.Lean.Engine.DataFeeds.Enumerators.ITradableDatesNotifier | |
EventHandler< NewTradableDateEventArgs > | NewTradableDate |
Event fired when there is a new tradable date More... | |
Events inherited from QuantConnect.Interfaces.IDataProviderEvents | |
EventHandler< InvalidConfigurationDetectedEventArgs > | InvalidConfigurationDetected |
Event fired when an invalid configuration has been detected More... | |
EventHandler< NumericalPrecisionLimitedEventArgs > | NumericalPrecisionLimited |
Event fired when the numerical precision in the factor file has been limited More... | |
EventHandler< DownloadFailedEventArgs > | DownloadFailed |
Event fired when there was an error downloading a remote file More... | |
EventHandler< ReaderErrorDetectedEventArgs > | ReaderErrorDetected |
Event fired when there was an error reading the data More... | |
EventHandler< StartDateLimitedEventArgs > | StartDateLimited |
Event fired when the start date has been limited More... | |
Subscription data reader is a wrapper on the stream reader class to download, unpack and iterate over a data file.
The class accepts any subscription configuration and automatically makes it available to enumerate
Definition at line 39 of file SubscriptionDataReader.cs.
QuantConnect.Lean.Engine.DataFeeds.SubscriptionDataReader.SubscriptionDataReader | ( | SubscriptionDataConfig | config, |
BaseDataRequest | dataRequest, | ||
IMapFileProvider | mapFileProvider, | ||
IFactorFileProvider | factorFileProvider, | ||
IDataCacheProvider | dataCacheProvider, | ||
IDataProvider | dataProvider, | ||
IObjectStore | objectStore | ||
) |
Subscription data reader takes a subscription request, loads the type, accepts the data source and enumerate on the results.
config | Subscription configuration object |
dataRequest | The data request |
mapFileProvider | Used for resolving the correct map files |
factorFileProvider | Used for getting factor files |
dataCacheProvider | Used for caching files |
dataProvider | The data provider to use |
Definition at line 142 of file SubscriptionDataReader.cs.
void QuantConnect.Lean.Engine.DataFeeds.SubscriptionDataReader.Initialize | ( | ) |
Initializes the SubscriptionDataReader instance
Should be called after all consumers of NewTradableDate event are set, since it will produce events.
Definition at line 172 of file SubscriptionDataReader.cs.
bool QuantConnect.Lean.Engine.DataFeeds.SubscriptionDataReader.MoveNext | ( | ) |
Advances the enumerator to the next element of the collection.
T:System.InvalidOperationException | The collection was modified after the enumerator was created. |
<filterpriority>2</filterpriority>
Definition at line 274 of file SubscriptionDataReader.cs.
void QuantConnect.Lean.Engine.DataFeeds.SubscriptionDataReader.Reset | ( | ) |
void QuantConnect.Lean.Engine.DataFeeds.SubscriptionDataReader.Dispose | ( | ) |
Dispose of the Stream Reader and close out the source stream and file connections.
Definition at line 608 of file SubscriptionDataReader.cs.
|
protectedvirtual |
Event invocator for the InvalidConfigurationDetected event
e | Event arguments for the InvalidConfigurationDetected event |
Definition at line 623 of file SubscriptionDataReader.cs.
|
protectedvirtual |
Event invocator for the NumericalPrecisionLimited event
e | Event arguments for the NumericalPrecisionLimited event |
Definition at line 632 of file SubscriptionDataReader.cs.
|
protectedvirtual |
Event invocator for the StartDateLimited event
e | Event arguments for the StartDateLimited event |
Definition at line 641 of file SubscriptionDataReader.cs.
|
protectedvirtual |
Event invocator for the DownloadFailed event
e | Event arguments for the DownloadFailed event |
Definition at line 650 of file SubscriptionDataReader.cs.
|
protectedvirtual |
Event invocator for the ReaderErrorDetected event
e | Event arguments for the ReaderErrorDetected event |
Definition at line 659 of file SubscriptionDataReader.cs.
|
protectedvirtual |
Event invocator for the NewTradableDate event
e | Event arguments for the NewTradableDate event |
Definition at line 668 of file SubscriptionDataReader.cs.
|
get |
Last read BaseData object from this type and source
Definition at line 120 of file SubscriptionDataReader.cs.
EventHandler<InvalidConfigurationDetectedEventArgs> QuantConnect.Lean.Engine.DataFeeds.SubscriptionDataReader.InvalidConfigurationDetected |
Event fired when an invalid configuration has been detected
Definition at line 89 of file SubscriptionDataReader.cs.
EventHandler<NumericalPrecisionLimitedEventArgs> QuantConnect.Lean.Engine.DataFeeds.SubscriptionDataReader.NumericalPrecisionLimited |
Event fired when the numerical precision in the factor file has been limited
Definition at line 94 of file SubscriptionDataReader.cs.
EventHandler<StartDateLimitedEventArgs> QuantConnect.Lean.Engine.DataFeeds.SubscriptionDataReader.StartDateLimited |
Event fired when the start date has been limited
Definition at line 99 of file SubscriptionDataReader.cs.
EventHandler<DownloadFailedEventArgs> QuantConnect.Lean.Engine.DataFeeds.SubscriptionDataReader.DownloadFailed |
Event fired when there was an error downloading a remote file
Definition at line 104 of file SubscriptionDataReader.cs.
EventHandler<ReaderErrorDetectedEventArgs> QuantConnect.Lean.Engine.DataFeeds.SubscriptionDataReader.ReaderErrorDetected |
Event fired when there was an error reading the data
Definition at line 109 of file SubscriptionDataReader.cs.
EventHandler<NewTradableDateEventArgs> QuantConnect.Lean.Engine.DataFeeds.SubscriptionDataReader.NewTradableDate |
Event fired when there is a new tradable date
Definition at line 114 of file SubscriptionDataReader.cs.