Nirvana C# Prerequisites

This section gives information on what is required to get started using the Nirvana Enterprise C# API. The Nirvana C# API is available in 2 different DLL distributions. The first is for developing Native Windows Applications (Nirvana DotNet.dll), and the second is compatible with Microsoft Silverlight applications (Nirvana Silverlight.dll). In both cases, the Client API is exactly the same.

Nirvana .NET

Nirvana .Net requires .Net version 3.5 or above. You can download .NET from the Microsoft Download website. The .NET installer will automatically set up the environment such that C# applications can be compiled and run natively on Microsoft Windows. Please see the Environment Section below for information on how to compile and run applications using the Nirvana C#.NET API.

Nirvana Silverlight

For a client to run a Nirvana Silverlight application, Microsoft Silverlight version 2.0 or above must be installed.

SSL

To subscribe to a channel using an SSL interface, extra requirements must be met. Nirvana C# supports client certificate authentication as well as anonymous SSL. For client ceritifcate authentication, the location of the client certificate and private key password, as well as the trust store must be known to the application. For instructions on how to run Nirvana C# applications using an SSL enabled interface, please see Client SSL.

Environment Setup

Compilation

It is recommended that you use Microsoft Visual Studio to compile Nirvana C# applications. Visual Studio will set up the required environment for compiling C# applications. However to make use of the Nirvana APIs, the location of the Nirvana libraries will need to be referenced such that they can be found by the compiler.

The libraries can be found in the dotnet\bin directory. For native Windows applications the "Nirvana DotNet.dll" library is required and for Silverlight applications the "Nirvana Silverlight.dll" is required.

Runtime

The Nirvana DLLs used to compile C# applications are unlike C++ in that these libraries are used both at compile time and at runtime. At compile time, the location of the library is specified as a reference such that it can be used by the compiler. At runtime this library is looked for in the same directory as the executable. For information on how to run an application without the DLL in the same directory, see Globally Accessible DLLs.

Sample Applications

The dotnet\bin directory of the Nirvana download contains precompiled sample applications for Nirvana C#.Net. These applications can be run on a PC running Microsoft Windows which has .NET installed as described above.

The source code for each application can be found in dotnet\examples along with a batch file which can be used to compile the application:

C:\Nirvana 5.0.xxxx\dotnet\examples\channeliterator> builddotnetsampleapp.bat channeliterator

This will compile the channeliterator sample application and place the executable in the dotnet\bin directory.