This sample class "simulates" a broadcast feed, which is one of the most common types of data feed, especially in a trading scenario.
Once you connect to such a feed, you immediately receive the current real-time update flow for all available data (the IExternalFeedListener interface).
Some broacast feed may also allow you to request the current state of a data item. Our sample feed class does support this (the SendCurrentValues method).

In our sample feed class, all available data consists of 30 fake stocks, which is what is needed by the StockList demo front-end. For each of the above stocks/items, we create a specific object, of type ExternalFeedProducer, whose job is to create a thread and generate the updates for the item. We collect all these objects in the _stockGenerators hash table.

In order to manage SendCurrentValues request, the feed does not return the current state to the caller, but it rather sends a redundant event to the IExternalFeedListener interface (i.e. an event which does not carry updated data but just the current state). We do this in a separate thread (we call this thread _snapshotSender; it runs the Run method reported above) and use the _snapshotQueue queue to send the SendCurrentValues requests to that thread.

Hope This Helps
Dario