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

Defines a container type to hold data produced by a data feed subscription More...

Public Member Functions

 DataFeedPacket (ISecurityPrice security, SubscriptionDataConfig configuration, IReadOnlyRef< bool > isSubscriptionRemoved=null)
 Initializes a new instance of the DataFeedPacket class More...
 
 DataFeedPacket (ISecurityPrice security, SubscriptionDataConfig configuration, List< BaseData > data, IReadOnlyRef< bool > isSubscriptionRemoved=null)
 Initializes a new instance of the DataFeedPacket class More...
 
void Add (BaseData data)
 Adds the specified data to this packet More...
 

Public Attributes

int Count => Data.Count
 Gets the number of data points held within this packet More...
 
bool IsSubscriptionRemoved => _isRemoved.Value
 Gets whether or not this packet should be filtered out due to the subscription being removed More...
 

Properties

ISecurityPrice Security [get]
 The security More...
 
SubscriptionDataConfig Configuration [get]
 The subscription configuration that produced this data More...
 
List< BaseDataData [get]
 The data for the security More...
 

Detailed Description

Defines a container type to hold data produced by a data feed subscription

Definition at line 27 of file DataFeedPacket.cs.

Constructor & Destructor Documentation

◆ DataFeedPacket() [1/2]

QuantConnect.Lean.Engine.DataFeeds.DataFeedPacket.DataFeedPacket ( ISecurityPrice  security,
SubscriptionDataConfig  configuration,
IReadOnlyRef< bool >  isSubscriptionRemoved = null 
)

Initializes a new instance of the DataFeedPacket class

Parameters
securityThe security whose data is held in this packet
configurationThe subscription configuration that produced this data
isSubscriptionRemovedReference to whether or not the subscription has since been removed, defaults to false

Definition at line 69 of file DataFeedPacket.cs.

◆ DataFeedPacket() [2/2]

QuantConnect.Lean.Engine.DataFeeds.DataFeedPacket.DataFeedPacket ( ISecurityPrice  security,
SubscriptionDataConfig  configuration,
List< BaseData data,
IReadOnlyRef< bool >  isSubscriptionRemoved = null 
)

Initializes a new instance of the DataFeedPacket class

Parameters
securityThe security whose data is held in this packet
configurationThe subscription configuration that produced this data
dataThe data to add to this packet. The list reference is reused internally and NOT copied.
isSubscriptionRemovedReference to whether or not the subscription has since been removed, defaults to false

Definition at line 85 of file DataFeedPacket.cs.

Member Function Documentation

◆ Add()

void QuantConnect.Lean.Engine.DataFeeds.DataFeedPacket.Add ( BaseData  data)

Adds the specified data to this packet

Parameters
dataThe data to be added to this packet

Definition at line 97 of file DataFeedPacket.cs.

Here is the caller graph for this function:

Member Data Documentation

◆ Count

int QuantConnect.Lean.Engine.DataFeeds.DataFeedPacket.Count => Data.Count

Gets the number of data points held within this packet

Definition at line 51 of file DataFeedPacket.cs.

◆ IsSubscriptionRemoved

bool QuantConnect.Lean.Engine.DataFeeds.DataFeedPacket.IsSubscriptionRemoved => _isRemoved.Value

Gets whether or not this packet should be filtered out due to the subscription being removed

Definition at line 61 of file DataFeedPacket.cs.

Property Documentation

◆ Security

ISecurityPrice QuantConnect.Lean.Engine.DataFeeds.DataFeedPacket.Security
get

The security

Definition at line 36 of file DataFeedPacket.cs.

◆ Configuration

SubscriptionDataConfig QuantConnect.Lean.Engine.DataFeeds.DataFeedPacket.Configuration
get

The subscription configuration that produced this data

Definition at line 44 of file DataFeedPacket.cs.

◆ Data

List<BaseData> QuantConnect.Lean.Engine.DataFeeds.DataFeedPacket.Data
get

The data for the security

Definition at line 56 of file DataFeedPacket.cs.


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