This is a .NET version of the Lightstreamer Stock-List Demos
C#
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
Images
Properties
src
.gitattributes
.gitignore
LICENSE
README.md
app.config
screen_dotnet.png
screen_dotnet_large.png restyle README Jul 16, 2014

README.md

Lightstreamer - Basic Stock-List Demo - .NET Client

This project contains a full example of a .NET client application that employs the .NET PCL client API for Lightstreamer.

Live Demo

screenshot

View live demo

(download DotNetClientDemo_N2.msi; launch it; follow the instructions)

Details

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 PCL 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.

Install

If you want to install a version of this demo pointing to your local Lightstreamer Server, follow these steps:

  • Note that, as prerequisite, 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 deploy.zip file that you can find in the deploy release of this project and extract the application installer (a ".msi" file).
  • Execute the downloaded file DotNetClientDemo_Local_N2.msi to install the application.
  • From the Start menu, go to the "Lightstreamer .NET Stock-List Demo" folder, and click the "DotNetStockListDemo.exe" link.

Build

To build your own version of the DotNetStockListDemo.exe executable, instead of using the one provided in the deploy.zip file from the Install section above, the example is comprised of the following source code and image files:

  • Source/*
  • Properties/*
  • Images/*

To recompile the provided sources, you just need to create a project for a Windows Application target, then include the sources and include reference to the .NET PCL Client library. You can download binaries files of the library (Lightstreamer_DotNet_PCL_Client.dll and Lightstreamer_DotNet_PCL_Client.pdb) from NuGet Lightstreamer.DotNet.Client or use directly the Package Manager Console: Install-Package Lightstreamer.DotNet.Client

Deploy

Once you have generated the Demo Client binaries (DotNetClientDemo_N2.exe), you should create a deploy folder, let's call it Deployment, and copy the binaries here. Then, get the .NET PCL Client API for Lightstreamer binaries files (see above) and put them in the Deployment folder. Now you can prepare a DotNetClient.bat launch script such as this:

@echo off

rem ---------------------------------------------------------------------------
rem Set the DotNet installation path as the current directory. Change the 
rem directory accordingly to your installation path of DotNet Adapter.

pushd .


rem ---------------------------------------------------------------------------
rem Start the StockList Demo Client, specifiyng to connect to the local
rem Lightstreamer Server instance.

start "DotNetStockListDemo" DotNetStockListDemo localhost 8080


rem ---------------------------------------------------------------------------
rem All done. Goes back to the original current directory and pauses, in case 
rem of any error.

echo Processes started. All done.
popd
pause

The DotNetClientDemo_N2 executable can also be run by double-clicking it; in its default configuration, the client will try to connect to Lightstreamer server at http://localhost:80. In this case, the QUOTE_ADAPTER has to be deployed in your local Lightstreamer server instance; the LiteralBasedProvider is also needed, but it is already provided by Lightstreamer server.

See Also

Lightstreamer Adapters Needed by These Demo Clients

Related Projects

Lightstreamer Compatibility Notes

  • Compatible with Lightstreamer .NET PCL Client Library version 3.0.0 or newer.
  • For Lightstreamer Allegro (+ .NET Client API support), Presto, Vivace.