Lean  $LEAN_TAG$
QuantConnect.Lean.Engine.DataFeeds.Enumerators.SubscriptionFilterEnumerator Class Reference

Implements a wrapper around a base data enumerator to provide a final filtering step More...

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

Public Member Functions

 SubscriptionFilterEnumerator (IEnumerator< BaseData > enumerator, Security security, DateTime endTime, bool extendedMarketHours, bool liveMode, SecurityExchangeHours securityExchangeHours)
 Initializes a new instance of the SubscriptionFilterEnumerator class More...
 
bool MoveNext ()
 Advances the enumerator to the next element of the collection. More...
 
void Dispose ()
 Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. More...
 
void Reset ()
 Sets the enumerator to its initial position, which is before the first element in the collection. More...
 

Static Public Member Functions

static SubscriptionFilterEnumerator WrapForDataFeed (IResultHandler resultHandler, IEnumerator< BaseData > enumerator, Security security, DateTime endTime, bool extendedMarketHours, bool liveMode, SecurityExchangeHours securityExchangeHours)
 Convenience method to wrap the enumerator and attach the data filter event to log and alery users of errors More...
 

Properties

BaseData Current [get]
 Gets the element in the collection at the current position of the enumerator. More...
 

Events

EventHandler< Exception > DataFilterError
 Fired when there's an error executing a user's data filter More...
 

Detailed Description

Implements a wrapper around a base data enumerator to provide a final filtering step

Definition at line 31 of file SubscriptionFilterEnumerator.cs.

Constructor & Destructor Documentation

◆ SubscriptionFilterEnumerator()

QuantConnect.Lean.Engine.DataFeeds.Enumerators.SubscriptionFilterEnumerator.SubscriptionFilterEnumerator ( IEnumerator< BaseData enumerator,
Security  security,
DateTime  endTime,
bool  extendedMarketHours,
bool  liveMode,
SecurityExchangeHours  securityExchangeHours 
)

Initializes a new instance of the SubscriptionFilterEnumerator class

Parameters
enumeratorThe source enumerator to be wrapped
securityThe security containing an exchange and data filter
endTimeThe end time of the subscription
extendedMarketHoursTrue if extended market hours are enabled
liveModeTrue if live mode
securityExchangeHoursThe security exchange hours instance to use

Definition at line 79 of file SubscriptionFilterEnumerator.cs.

Here is the caller graph for this function:

Member Function Documentation

◆ WrapForDataFeed()

static SubscriptionFilterEnumerator QuantConnect.Lean.Engine.DataFeeds.Enumerators.SubscriptionFilterEnumerator.WrapForDataFeed ( IResultHandler  resultHandler,
IEnumerator< BaseData enumerator,
Security  security,
DateTime  endTime,
bool  extendedMarketHours,
bool  liveMode,
SecurityExchangeHours  securityExchangeHours 
)
static

Convenience method to wrap the enumerator and attach the data filter event to log and alery users of errors

Parameters
resultHandlerResult handler reference used to send errors
enumeratorThe source enumerator to be wrapped
securityThe security who's data is being enumerated
endTimeThe end time of the subscription
extendedMarketHoursTrue if extended market hours are enabled
liveModeTrue if live mode
securityExchangeHoursThe security exchange hours instance to use
Returns
A new instance of the SubscriptionFilterEnumerator class that has had it's DataFilterError event subscribed to to send errors to the result handler

Definition at line 58 of file SubscriptionFilterEnumerator.cs.

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

◆ MoveNext()

bool QuantConnect.Lean.Engine.DataFeeds.Enumerators.SubscriptionFilterEnumerator.MoveNext ( )

Advances the enumerator to the next element of the collection.

Returns
true if the enumerator was successfully advanced to the next element; false if the enumerator has passed the end of the collection.
Exceptions
T:System.InvalidOperationExceptionThe collection was modified after the enumerator was created.

<filterpriority>2</filterpriority>

Definition at line 121 of file SubscriptionFilterEnumerator.cs.

◆ Dispose()

void QuantConnect.Lean.Engine.DataFeeds.Enumerators.SubscriptionFilterEnumerator.Dispose ( )

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

<filterpriority>2</filterpriority>

Definition at line 171 of file SubscriptionFilterEnumerator.cs.

◆ Reset()

void QuantConnect.Lean.Engine.DataFeeds.Enumerators.SubscriptionFilterEnumerator.Reset ( )

Sets the enumerator to its initial position, which is before the first element in the collection.

Exceptions
T:System.InvalidOperationExceptionThe collection was modified after the enumerator was created.

<filterpriority>2</filterpriority>

Definition at line 180 of file SubscriptionFilterEnumerator.cs.

Property Documentation

◆ Current

BaseData QuantConnect.Lean.Engine.DataFeeds.Enumerators.SubscriptionFilterEnumerator.Current
get

Gets the element in the collection at the current position of the enumerator.

Returns
The element in the collection at the current position of the enumerator.

Definition at line 97 of file SubscriptionFilterEnumerator.cs.

Event Documentation

◆ DataFilterError

EventHandler<Exception> QuantConnect.Lean.Engine.DataFeeds.Enumerators.SubscriptionFilterEnumerator.DataFilterError

Fired when there's an error executing a user's data filter

Definition at line 36 of file SubscriptionFilterEnumerator.cs.


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