Getting Started with .NET
Example Source Code

.NET/C#

Examples referenced

Last Update May 2021
.Net/C# - Compilers/Packages Compilers: Microsoft VS2019
Packages Preloaded: NuGet Package Manager 2.12 (or greater)
C# Version 6.0 or greater
Prerequisites

Access Credentials

If accessing content from:

  • Desktop (Eikon 4.0.36 or greater / Refinitiv Workspace 1.8 or greater)
  • Deployed Environment (ADS 3.2 or greater)

The goal of this Getting Started tutorial is to provide the .NET developer with the steps required to prepare an environment to access content within the Refinitiv Data Platform. The Refinitiv Data Library for .Net is designed as an ease-of-use interface allowing the developer simple access to content from multiple supporting access points. That is, they can choose to access content directly within the cloud, access from the desktop through either Eikon or Refinitiv Workspace desktop, or via a locally deployed enterprise streaming installation (ADS).

This quick start guide will provide the steps to set up and configure the .NET example package necessary to access the content.

Note: The Refinitiv Data Library for .NET is a community-based API and is managed as an open-source project. It is not an officially supported API.

Additional details on the prerequisites

All examples are built with Microsoft .Net Core 3.1 and should be pre-installed.  The library supports .NET Framework 4.5.2, and .NET Standard 2.0.  With the .NET Standard support, applications can be targeted to use up to .NET 6.

All examples will automatically download NuGet dependencies when loading/building a solution.  NuGet Package Manager 2.12 (or greater) is required to be pre-installed prior to loading the solution.  The minimum Package Manager is available within the modern Visual Studio IDE's such as 2017, 2019.  Developers may need to upgrade their package managers for older IDE's such as VS2015.

Define your credentials

The Refinitiv Data Platform (RDP) provides a number of data services such as streaming, request/reply, near real-time message queues, and bulk files.  The downloadable example package will provide a series of examples that will cover specific capabilities that will support a cross-section of the services within the platform.  Once the .NET Example package has been downloaded and uncompressed, load the solution project within Visual Studio.

To ensure you can successfully execute the examples within the Content and Delivery sections, you will need to define your credentials within the Configuration folder of the example package.  Depending on how you plan to access content, you can then test whether your credentials work by running one of the examples within the Quick Start section.

First, load up the Credentials.cs file within the Configuration folder.

The Credentials file is a series of settings, depending on how you plan to access the content.  Prior to setting, ensure you have reviewed the Access Credentials Guide to determine the requirements. Modify the relevant configuration parameters to specify any connection properties and user credentials.

Testing your Credentials

Once the credential settings have been defined, select an example outlined within the Quick Start folder.  For the selected example:

  1. Right-click the specific project and choose "Set As Startup Project"
  2. From the Visual Studio menu, choose "Build - Build Solution"
  3. Once built, run the example by hitting (Ctrl+F5).

Example 1.1 - PlatformSession

Test your RDP credentials providing access to a number of endpoints as well as streaming services.  Running the example should result in the following output:

Example 1.2 - DesktopSession

Test your desktop credentials providing access to a number of endpoints as well as streaming services.  When testing your desktop credentials, the Eikon or Refinitiv Workspace application must be running.  Running the example should result in the following output:

Example 1.3 - DeployedSession

Test your connection into a deployed streaming environment providing access to streaming market data services.  Running the example should result in the following output:

Note: The NuGet packages used by these examples will automatically load.  If you have issues or errors during the build, Clean the solution then Build again.

If you have any issues running the examples, refer to the Troubleshooting section for more details.

If you have successfully verified a connection using one of the Quick Start examples, you are ready to explore the examples available within the Delivery and Content folders defined within the example package.

Enable your session environment

When testing against the examples within the Delivery and Content folders, you only need to set up your session environment once.  Once enabled, all examples will automatically use that session.  Within the Session.cs source file, update the SessionType setting to either DESKTOP, RDP, or DEPLOYED.  The default is RDP

Troubleshooting

The specific quick start example you chose to test your credentials will provide the reason for failure.  For example:

The details you provided within the Credentials.cs file within the Configuration project may be incorrect.  Refer to the section above for details around credentials and verify these settings.  In addition, ensure you have chosen the correct Session for your connection requirements.  Depending on your session settings, it is suggested to reach out to the appropriate person(s) if you believe your connection details are correct:

  • RDP Session
    • Reach out to your account representive to report and confirm the issues you are facing and they can verify the connection details and access credentials based on your license    
  • Desktop Session
    • Within either Refinitiv Workspace or Eikon, you can access Get Help & Support by navigating to the Help menu or executing the "F1" hotkey
  • Deployed Session
    • Reach out to your local market data team and they can confirm your DACs credentials

To further analyze details related to any errors, you can refer to the log file generated by all examples.  For the specific project, navigate to the executable directory (bin) and locate the log file - format: RDPLog_<pid>.log

Next Steps

Once credentials have been verified, feel free to work through the tutorials to better understand the capabilities and power of the Refinitiv Data Library for .Net.