Lean  $LEAN_TAG$
QuantConnect.Algorithm.Framework.NotifiedSecurityChanges Class Reference

Provides convenience methods for updating collections in responses to securities changed events More...

Static Public Member Functions

static void UpdateCollection (ICollection< Security > securities, SecurityChanges changes)
 Adds and removes the security changes to/from the collection More...
 
static void UpdateCollection< TValue > (ICollection< TValue > securities, SecurityChanges changes, Func< Security, TValue > valueFactory)
 Adds and removes the security changes to/from the collection More...
 
static void UpdateDictionary< TValue > (IDictionary< Security, TValue > dictionary, SecurityChanges changes, Func< Security, TValue > valueFactory)
 Adds and removes the security changes to/from the collection More...
 
static void UpdateDictionary< TValue > (IDictionary< Symbol, TValue > dictionary, SecurityChanges changes, Func< Security, TValue > valueFactory)
 Adds and removes the security changes to/from the collection More...
 
static void UpdateDictionary< TKey, TValue > (IDictionary< TKey, TValue > dictionary, SecurityChanges changes, Func< Security, TKey > keyFactory, Func< Security, TValue > valueFactory)
 Most generic form of UpdateCollection More...
 
static void Update (SecurityChanges changes, Action< Security > add, Action< Security > remove)
 Invokes the provided add and remove functions for each More...
 

Detailed Description

Provides convenience methods for updating collections in responses to securities changed events

Definition at line 27 of file NotifiedSecurityChanges.cs.

Member Function Documentation

◆ UpdateCollection()

static void QuantConnect.Algorithm.Framework.NotifiedSecurityChanges.UpdateCollection ( ICollection< Security securities,
SecurityChanges  changes 
)
static

Adds and removes the security changes to/from the collection

Parameters
securitiesThe securities collection to be updated with the changes
changesThe changes to be applied to the securities collection

Definition at line 34 of file NotifiedSecurityChanges.cs.

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

◆ UpdateCollection< TValue >()

static void QuantConnect.Algorithm.Framework.NotifiedSecurityChanges.UpdateCollection< TValue > ( ICollection< TValue >  securities,
SecurityChanges  changes,
Func< Security, TValue >  valueFactory 
)
static

Adds and removes the security changes to/from the collection

Parameters
securitiesThe securities collection to be updated with the changes
changesThe changes to be applied to the securities collection
valueFactoryDelegate used to create instances of TValue from a Security object

Definition at line 45 of file NotifiedSecurityChanges.cs.

Here is the call graph for this function:

◆ UpdateDictionary< TValue >() [1/2]

static void QuantConnect.Algorithm.Framework.NotifiedSecurityChanges.UpdateDictionary< TValue > ( IDictionary< Security, TValue >  dictionary,
SecurityChanges  changes,
Func< Security, TValue >  valueFactory 
)
static

Adds and removes the security changes to/from the collection

Parameters
dictionaryThe securities collection to be updated with the changes
changesThe changes to be applied to the securities collection
valueFactoryFactory for creating dictonary values for a key

Definition at line 56 of file NotifiedSecurityChanges.cs.

◆ UpdateDictionary< TValue >() [2/2]

static void QuantConnect.Algorithm.Framework.NotifiedSecurityChanges.UpdateDictionary< TValue > ( IDictionary< Symbol, TValue >  dictionary,
SecurityChanges  changes,
Func< Security, TValue >  valueFactory 
)
static

Adds and removes the security changes to/from the collection

Parameters
dictionaryThe securities collection to be updated with the changes
changesThe changes to be applied to the securities collection
valueFactoryFactory for creating dictonary values for a key

Definition at line 71 of file NotifiedSecurityChanges.cs.

◆ UpdateDictionary< TKey, TValue >()

static void QuantConnect.Algorithm.Framework.NotifiedSecurityChanges.UpdateDictionary< TKey, TValue > ( IDictionary< TKey, TValue >  dictionary,
SecurityChanges  changes,
Func< Security, TKey >  keyFactory,
Func< Security, TValue >  valueFactory 
)
static

Most generic form of UpdateCollection

Template Parameters
TKeyThe dictionary's key type
TValueThe dictionary's value type
Parameters
dictionaryThe dictionary to update
changesThe
See also
SecurityChanges
to apply to the dictionary
keyFactorySelector pulling TKey from a
See also
Security
valueFactorySelector pulling TValue from a
See also
Security

Definition at line 89 of file NotifiedSecurityChanges.cs.

Here is the call graph for this function:

◆ Update()

static void QuantConnect.Algorithm.Framework.NotifiedSecurityChanges.Update ( SecurityChanges  changes,
Action< Security add,
Action< Security remove 
)
static

Invokes the provided add and remove functions for each

Parameters
changesThe security changes to process
addFunction called for each added security
removeFunction called for each removed security

Definition at line 116 of file NotifiedSecurityChanges.cs.

Here is the caller graph for this function:

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