Lean  $LEAN_TAG$
QuantConnect.Lean.Engine.DataFeeds.Transport.RemoteFileSubscriptionStreamReader Class Reference

Represents a stream reader capabable of downloading a remote file and then reading it from disk More...

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

Public Member Functions

 RemoteFileSubscriptionStreamReader (IDataCacheProvider dataCacheProvider, string source, string downloadDirectory, IEnumerable< KeyValuePair< string, string >> headers)
 Initializes a new instance of the RemoteFileSubscriptionStreamReader class. More...
 
string ReadLine ()
 Gets the next line/batch of content from the stream More...
 
void Dispose ()
 Disposes of the stream More...
 

Static Public Member Functions

static void SetDownloadProvider (IDownloadProvider downloader)
 Save reference to the download system. More...
 

Public Attributes

bool ShouldBeRateLimited => false
 Gets whether or not this stream reader should be rate limited More...
 
StreamReader StreamReader => _streamReader.StreamReader
 Direct access to the StreamReader instance More...
 

Properties

string LocalFileName [get]
 The local file name of the downloaded file More...
 
SubscriptionTransportMedium TransportMedium [get]
 Gets SubscriptionTransportMedium.RemoteFile More...
 
bool EndOfStream [get]
 Gets whether or not there's more data to be read in the stream More...
 
- Properties inherited from QuantConnect.Interfaces.IStreamReader
SubscriptionTransportMedium TransportMedium [get]
 Gets the transport medium of this stream reader More...
 
bool EndOfStream [get]
 Gets whether or not there's more data to be read in the stream More...
 
StreamReader StreamReader [get]
 Direct access to the StreamReader instance More...
 
bool ShouldBeRateLimited [get]
 Gets whether or not this stream reader should be rate limited More...
 

Detailed Description

Represents a stream reader capabable of downloading a remote file and then reading it from disk

Definition at line 29 of file RemoteFileSubscriptionStreamReader.cs.

Constructor & Destructor Documentation

◆ RemoteFileSubscriptionStreamReader()

QuantConnect.Lean.Engine.DataFeeds.Transport.RemoteFileSubscriptionStreamReader.RemoteFileSubscriptionStreamReader ( IDataCacheProvider  dataCacheProvider,
string  source,
string  downloadDirectory,
IEnumerable< KeyValuePair< string, string >>  headers 
)

Initializes a new instance of the RemoteFileSubscriptionStreamReader class.

Parameters
dataCacheProviderThe IDataCacheProvider used to retrieve a stream of data
sourceThe remote url to be downloaded via web client
downloadDirectoryThe local directory and destination of the download
headersDefines header values to add to the request

Definition at line 58 of file RemoteFileSubscriptionStreamReader.cs.

Here is the call graph for this function:

Member Function Documentation

◆ ReadLine()

string QuantConnect.Lean.Engine.DataFeeds.Transport.RemoteFileSubscriptionStreamReader.ReadLine ( )

Gets the next line/batch of content from the stream

Implements QuantConnect.Interfaces.IStreamReader.

Definition at line 141 of file RemoteFileSubscriptionStreamReader.cs.

◆ Dispose()

void QuantConnect.Lean.Engine.DataFeeds.Transport.RemoteFileSubscriptionStreamReader.Dispose ( )

Disposes of the stream

Definition at line 149 of file RemoteFileSubscriptionStreamReader.cs.

◆ SetDownloadProvider()

static void QuantConnect.Lean.Engine.DataFeeds.Transport.RemoteFileSubscriptionStreamReader.SetDownloadProvider ( IDownloadProvider  downloader)
static

Save reference to the download system.

Parameters
downloaderDownloader provider for the remote file fetching.

Definition at line 158 of file RemoteFileSubscriptionStreamReader.cs.

Here is the caller graph for this function:

Member Data Documentation

◆ ShouldBeRateLimited

bool QuantConnect.Lean.Engine.DataFeeds.Transport.RemoteFileSubscriptionStreamReader.ShouldBeRateLimited => false

Gets whether or not this stream reader should be rate limited

Definition at line 39 of file RemoteFileSubscriptionStreamReader.cs.

◆ StreamReader

StreamReader QuantConnect.Lean.Engine.DataFeeds.Transport.RemoteFileSubscriptionStreamReader.StreamReader => _streamReader.StreamReader

Direct access to the StreamReader instance

Definition at line 44 of file RemoteFileSubscriptionStreamReader.cs.

Property Documentation

◆ LocalFileName

string QuantConnect.Lean.Engine.DataFeeds.Transport.RemoteFileSubscriptionStreamReader.LocalFileName
get

The local file name of the downloaded file

Definition at line 49 of file RemoteFileSubscriptionStreamReader.cs.

◆ TransportMedium

SubscriptionTransportMedium QuantConnect.Lean.Engine.DataFeeds.Transport.RemoteFileSubscriptionStreamReader.TransportMedium
get

◆ EndOfStream

bool QuantConnect.Lean.Engine.DataFeeds.Transport.RemoteFileSubscriptionStreamReader.EndOfStream
get

Gets whether or not there's more data to be read in the stream

Definition at line 134 of file RemoteFileSubscriptionStreamReader.cs.


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