Lightstreamer - Basic Stock-List Demo - .NET Client
This project contains a full example of a Windows Forms client application that leverages the .NET Standard client API for Lightstreamer.
View live demo
(download publish.zip; unzip it; launch StockListDemo.exe; enjoy)
(Requires net6.0 to be installed on the local system)
This is a .NET desktop version of the Lightstreamer - Basic Stock-List Demo - HTML Client, where thirty items are subscribed to.
This app uses the .NET Standard Client API for Lightstreamer to handle the communications with Lightstreamer Server. A simple user interface is implemented to display the real-time data received from Lightstreamer Server.
The application uses a grid to display the real-time data. You can resize and drag the columns around.
This application uses the LightstreamerClient class to connect to Lightstreamer Server and subscribe to the 30 items. The client library offers auto-reconnection and auto-resubscription logic out of the box. The status of the connection can be seen on the top right corener or in the bottom status bar of the demo. A DataGridview object from System.Windows.Forms is used to display the real-time updates received from Lightstreamer Server. The application code implements a cell highlighting mechanism, too.
At the top right of the form there are few controls that allow you to:
- dynamically change the transport over which the client session with the Lightstremer server is based;
- reset the connection with the Lightstreamer server to force a new client session;
- dynamically change the max updates frequency allowed for the subscription, varying from unlimited to 1 update every 100 seconds.
Double-clicking on the last column a new Form will be shown with a Chart object from System.Windows.Forms.DataVisualization drawing a real-time serie for the quotes of the related stock. Each new Chart form involves a new Subscription in order to be totally released from any limitation on the frequency of updates imposed on the subscription of the main grid.
If you want to install a version of this demo pointing to your local Lightstreamer Server, follow these steps:
- Note that, as prerequisite, a windows system and .NET 6.0 are required.
- The Lightstreamer - Stock- List Demo - Java Adapter has to be deployed on your local Lightstreamer Server instance. Please check out that project and follow the installation instructions provided with it.
- Launch Lightstreamer Server.
- Download the
publish.zipfile that you can find in the latest release of this project and extract it in your local file system.
StockListDemo.exeand enjoy it.
The Visual Studio project provided was created from the 'Windows Forms App' template and specify as target framework .NET 6.0.
Lightstreamer Adapters Needed by These Demo Clients
- Lightstreamer - Stock-List Demo - Java Adapter
- Lightstreamer - Reusable Metadata Adapters - Java Adapter
- Lightstreamer - Stock-List Demo - .NET Adapter
- Lightstreamer .NET Standard Client SDK
- Lightstreamer - Stock-List Demos - HTML Clients
- Lightstreamer - Basic Stock-List Demo - jQuery (jqGrid) Client
- Lightstreamer - Basic Stock-List Demo - Java SE (Swing) Client
- Lightstreamer - Quickstart Example - .NET Client
Lightstreamer Compatibility Notes
- Compatible with Lightstreamer .NET Standard Client Library version 6.x.
- Ensure that .NET Standard Client API is supported by your Lightstreamer Server license configuration.
- For instructions compatible with .NET Standard Client library version 5.x, please refer to this tag
- For instructions compatible with .NET Standard Client library version 4.x, please refer to this tag