using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading; namespace EnduserAPIExample { class Program { static void Main(string[] args) { string strActKey = "9EFJK-TVJM0-MCDET-EZKXJ"; string strHostid = "HOSTNAME=my_hostname"; LACEnduserAPI.LAC_EnduserPortClient Client = new LACEnduserAPI.LAC_EnduserPortClient(); LACEnduserAPI.Soap_Response_License Response = Client.CreateLicenseRequest(strActKey, strHostid); if (Response.result_code != 0) { PrintResponse(Response); return; } do { Response = Client.GetLicense(strActKey, strHostid); if (Response.result_code != 1) { PrintResponse(Response); return; } Thread.Sleep(2000); } while (Response.result_code != 0); PrintResponse(Response); } static void PrintResponse(LACEnduserAPI.Soap_Response_License Response) { Console.WriteLine("Result code: " + Response.result_code.ToString()); Console.WriteLine("Result string: " + Response.result_string); } } }