Example #1
0
        private static void ExecuteCodeFromAssemblyInternal(ExecuteAssemblyOptions options)
        {
            string filePath           = options.Name;
            string executorType       = options.ExecutorType;
            var    fileContent        = File.ReadAllBytes(filePath);
            string body               = Convert.ToBase64String(fileContent);
            string requestData        = @"{""Body"":""" + body + @""",""LibraryType"":""" + executorType + @"""}";
            var    responseFromServer = CreatioClient.ExecutePostRequest(ExecutorUrl, requestData);

            Console.WriteLine(responseFromServer);
        }
Example #2
0
 public static int ExecuteCodeFromAssembly(ExecuteAssemblyOptions options)
 {
     try {
         Configure(options);
         ExecuteCodeFromAssemblyInternal(options);
         Console.WriteLine();
         Console.WriteLine("Done");
         return(0);
     } catch (Exception e) {
         Console.WriteLine(e.Message);
         return(1);
     }
 }