C# Prerequisites
This section gives information on what is required to get started using the C# API for Universal Messaging. The C# API for Universal Messaging 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.
Universal Messaging .NET
Universal Messaging .Net requires Microsoft .Net Framework, which you can download from the Microsoft Download website at
http://www.microsoft.com/downloads/. 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 Setup section below for information on how to compile and run applications using the Universal Messaging C#.NET API.
Universal Messaging Silverlight
For a client to run a Universal Messaging Silverlight application, Microsoft Silverlight must be installed. You can download this from
http://www.microsoft.com/silverlight/get-started/install/.
SSL
To subscribe to a channel using an SSL interface, extra requirements must be met. Universal Messaging C# supports client certificate authentication as well as anonymous SSL. For client certificate 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 Universal Messaging 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 Universal Messaging C# applications. Visual Studio will set up the required environment for compiling C# applications. However to make use of the Universal Messaging APIs, the location of the Universal Messaging 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 Universal Messaging 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 Universal Messaging download contains precompiled sample applications for Universal Messaging 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:
> cd C:\SoftwareAG\UniversalMessaging\dotnet\examples\channeliterator
> builddotnetsampleapp.bat channeliterator
This will compile the channeliterator sample application and place the executable in the dotnet\bin directory.