Lean  $LEAN_TAG$
QuantConnect.Lean.Engine.DataFeeds.SubscriptionCollection Class Reference

Provides a collection for holding subscriptions. More...

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

Public Member Functions

 SubscriptionCollection ()
 Initializes a new instance of the SubscriptionCollection class More...
 
bool Contains (SubscriptionDataConfig configuration)
 Checks the collection for the specified subscription configuration More...
 
bool TryAdd (Subscription subscription)
 Attempts to add the specified subscription to the collection. If another subscription exists with the same configuration then it won't be added. More...
 
bool TryGetValue (SubscriptionDataConfig configuration, out Subscription subscription)
 Attempts to retrieve the subscription with the specified configuration More...
 
bool TryRemove (SubscriptionDataConfig configuration, out Subscription subscription)
 Attempts to remove the subscription with the specified configuraton from the collection. More...
 
IEnumerator< SubscriptionGetEnumerator ()
 Returns an enumerator that iterates through the collection. More...
 
Ref< TimeSpan > UpdateAndGetFillForwardResolution (SubscriptionDataConfig configuration=null)
 Gets and updates the fill forward resolution by checking specified subscription configurations and selecting the smallest resoluton not equal to tick More...
 
void FreezeFillForwardResolution (bool freeze)
 Will disable or enable fill forward resolution updates More...
 

Events

EventHandler< FillForwardResolutionChangedEventFillForwardResolutionChanged
 Event fired when the fill forward resolution changes More...
 

Detailed Description

Provides a collection for holding subscriptions.

Definition at line 30 of file SubscriptionCollection.cs.

Constructor & Destructor Documentation

◆ SubscriptionCollection()

QuantConnect.Lean.Engine.DataFeeds.SubscriptionCollection.SubscriptionCollection ( )

Initializes a new instance of the SubscriptionCollection class

Definition at line 49 of file SubscriptionCollection.cs.

Member Function Documentation

◆ Contains()

bool QuantConnect.Lean.Engine.DataFeeds.SubscriptionCollection.Contains ( SubscriptionDataConfig  configuration)

Checks the collection for the specified subscription configuration

Parameters
configurationThe subscription configuration to check for
Returns
True if a subscription with the specified configuration is found in this collection, false otherwise

Definition at line 62 of file SubscriptionCollection.cs.

◆ TryAdd()

bool QuantConnect.Lean.Engine.DataFeeds.SubscriptionCollection.TryAdd ( Subscription  subscription)

Attempts to add the specified subscription to the collection. If another subscription exists with the same configuration then it won't be added.

Parameters
subscriptionThe subscription to add
Returns
True if the subscription is successfully added, false otherwise

Definition at line 73 of file SubscriptionCollection.cs.

Here is the caller graph for this function:

◆ TryGetValue()

bool QuantConnect.Lean.Engine.DataFeeds.SubscriptionCollection.TryGetValue ( SubscriptionDataConfig  configuration,
out Subscription  subscription 
)

Attempts to retrieve the subscription with the specified configuration

Parameters
configurationThe subscription's configuration
subscriptionThe subscription matching the configuration, null if not found
Returns
True if the subscription is successfully retrieved, false otherwise

Definition at line 90 of file SubscriptionCollection.cs.

Here is the caller graph for this function:

◆ TryRemove()

bool QuantConnect.Lean.Engine.DataFeeds.SubscriptionCollection.TryRemove ( SubscriptionDataConfig  configuration,
out Subscription  subscription 
)

Attempts to remove the subscription with the specified configuraton from the collection.

Parameters
configurationThe configuration of the subscription to remove
subscriptionThe removed subscription, null if not found.
Returns
True if the subscription is successfully removed, false otherwise

Definition at line 101 of file SubscriptionCollection.cs.

◆ GetEnumerator()

IEnumerator<Subscription> QuantConnect.Lean.Engine.DataFeeds.SubscriptionCollection.GetEnumerator ( )

Returns an enumerator that iterates through the collection.

Returns
An enumerator that can be used to iterate through the collection.

Definition at line 123 of file SubscriptionCollection.cs.

◆ UpdateAndGetFillForwardResolution()

Ref<TimeSpan> QuantConnect.Lean.Engine.DataFeeds.SubscriptionCollection.UpdateAndGetFillForwardResolution ( SubscriptionDataConfig  configuration = null)

Gets and updates the fill forward resolution by checking specified subscription configurations and selecting the smallest resoluton not equal to tick

Definition at line 144 of file SubscriptionCollection.cs.

Here is the caller graph for this function:

◆ FreezeFillForwardResolution()

void QuantConnect.Lean.Engine.DataFeeds.SubscriptionCollection.FreezeFillForwardResolution ( bool  freeze)

Will disable or enable fill forward resolution updates

Definition at line 156 of file SubscriptionCollection.cs.

Here is the caller graph for this function:

Event Documentation

◆ FillForwardResolutionChanged

EventHandler<FillForwardResolutionChangedEvent> QuantConnect.Lean.Engine.DataFeeds.SubscriptionCollection.FillForwardResolutionChanged

Event fired when the fill forward resolution changes

Definition at line 44 of file SubscriptionCollection.cs.


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