XenServer.NET
=============

XenServer.NET is a complete SDK for Citrix Hypervisor, exposing the Citrix
Hypervisor API as .NET classes. It is written in C#.

XenServer.NET includes a class for every API class, and a method for each API
call, so API documentation and examples written for other languages will apply
equally well to .NET. In particular, the SDK Guide and the Management API Guide
are ideal for developers wishing to use XenServer.NET.

XenServer.NET is free software. You can redistribute and modify it under the
terms of the BSD 2-Clause license. See LICENSE.txt for details.

This library is accompanied by pedagogical examples. These do not form
part of this library, and are licensed for redistribution and modification
under the BSD 2-Clause license.


Reference
---------

For Citrix Hypervisor documentation see https://docs.citrix.com/en-us/citrix-hypervisor/

The Citrix Hypervisor Management API Reference is available at
https://developer-docs.citrix.com/projects/citrix-hypervisor-management-api/en/latest/

The Citrix Hypervisor Software Development Kit Guide is available at
https://developer-docs.citrix.com/projects/citrix-hypervisor-sdk/en/latest/

For community content, blogs, and downloads, visit
https://www.citrix.com/community/citrix-developer/

To network with other developers using Citrix Hypervisor visit
https://discussions.citrix.com/forum/101-hypervisor-formerly-xenserver/


Prerequisites
-------------

This library requires .NET Standard 2.0.


Dependencies
------------

XenServer.NET is dependent upon the following libraries:

- Newtonsoft JSON.NET by James Newton-King (see https://www.newtonsoft.com/).
  JSON.NET is licensed under the MIT license; see LICENSE.Newtonsoft.Json.txt
  for details. A patched version of the library (Newtonsoft.Json.CH.dll) is
  shipped with XenServer.NET.


Downloads
---------

This archive contains the following folders that are relevant to .NET developers:
- XenServer.NET\bin: contains the ready compiled binaries
- XenServer.NET\src: contains the source code shipped as a Visual Studio project.
- XenServer.NET\samples: contains the examples shipped as a Visual studio solution.


Getting Started
---------------

Extract the contents of this archive.

A. To use the compiled binaries in your code:
  1. Copy XenServer.dll and Newtonsoft.Json.CH.dll
     from the bin folder into your own workspace.
  2. In Visual Studio, add references to all DLLs from your own program.
     Project > Add Reference > Browse.
  3. You should now be ready to compile against XenServer.NET.

B. To build the source code:
  1. Copy Newtonsoft.Json.CH.dll from the bin
     folder into the source code folder at the same level as the project file
     XenServer.csproj
  2. Open the project XenServer.csproj in Visual Studio.
  3. You should now be ready to build the source code.

C. To run the examples:
  1. Copy XenServer.dll and Newtonsoft.Json.CH.dll
     from the bin folder into the samples folder at the same level as the
     project file XenSdkSample.csproj.
  2. Open XenSdkSample.sln inside Visual Studio (2019 or greater).
  3. You should now be ready to compile the solution and run the examples.
     The solution project is a console application expecting the parameters
     <host> <username> <password> to be passed to its Main method.
