Lean  $LEAN_TAG$
QuantConnect.Lean.Engine.DataFeeds.BaseDownloaderDataProvider Class Referenceabstract

Base downloader implementation with some helper methods More...

Inheritance diagram for QuantConnect.Lean.Engine.DataFeeds.BaseDownloaderDataProvider:
[legend]

Protected Member Functions

Stream DownloadOnce (string key, Action< string > download)
 Helper method which guarantees each requested key is downloaded only once concurrently if required based on NeedToDownload More...
 
virtual Stream GetStream (string key)
 Get's the stream for a given file path More...
 
abstract bool NeedToDownload (string filePath)
 Main filter to determine if this file needs to be downloaded More...
 
- Protected Member Functions inherited from QuantConnect.Lean.Engine.DataFeeds.DefaultDataProvider
virtual void OnNewDataRequest (DataProviderNewDataRequestEventArgs e)
 Event invocator for the NewDataRequest event More...
 

Additional Inherited Members

- Public Member Functions inherited from QuantConnect.Lean.Engine.DataFeeds.DefaultDataProvider
virtual Stream Fetch (string key)
 Retrieves data from disc to be used in an algorithm More...
 
void Dispose ()
 The stream created by this type is passed up the stack to the IStreamReader The stream is closed when the StreamReader that wraps this stream is disposed More...
 
- Events inherited from QuantConnect.Lean.Engine.DataFeeds.DefaultDataProvider
EventHandler< DataProviderNewDataRequestEventArgsNewDataRequest
 Event raised each time data fetch is finished (successfully or not) More...
 
- Events inherited from QuantConnect.Interfaces.IDataProvider
EventHandler< DataProviderNewDataRequestEventArgsNewDataRequest
 Event raised each time data fetch is finished (successfully or not) More...
 

Detailed Description

Base downloader implementation with some helper methods

Definition at line 26 of file BaseDownloaderDataProvider.cs.

Member Function Documentation

◆ DownloadOnce()

Stream QuantConnect.Lean.Engine.DataFeeds.BaseDownloaderDataProvider.DownloadOnce ( string  key,
Action< string >  download 
)
protected

Helper method which guarantees each requested key is downloaded only once concurrently if required based on NeedToDownload

Parameters
keyA string representing where the data is stored
downloadThe download operation we want to perform once concurrently per key
Returns
A Stream of the data requested

Definition at line 39 of file BaseDownloaderDataProvider.cs.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetStream()

virtual Stream QuantConnect.Lean.Engine.DataFeeds.BaseDownloaderDataProvider.GetStream ( string  key)
protectedvirtual

Get's the stream for a given file path

Reimplemented in QuantConnect.Lean.Engine.DataFeeds.DownloaderDataProvider.

Definition at line 57 of file BaseDownloaderDataProvider.cs.

Here is the caller graph for this function:

◆ NeedToDownload()

abstract bool QuantConnect.Lean.Engine.DataFeeds.BaseDownloaderDataProvider.NeedToDownload ( string  filePath)
protectedpure virtual

Main filter to determine if this file needs to be downloaded

Parameters
filePathFile we are looking at
Returns
True if should download

Implemented in QuantConnect.Lean.Engine.DataFeeds.DownloaderDataProvider, and QuantConnect.Lean.Engine.DataFeeds.ApiDataProvider.

Here is the caller graph for this function:

The documentation for this class was generated from the following file: