Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Compile and run C# code string sent from QM to the LA HTTP server
#1
Very good sharing. 

In QM, using the CsScript class can only execute C#5 version of code. Can you create a function(CallLa) to execute C#6 or higher code in LA? For example C#8 ,thank you.

I am currently confused about how to implement this function: need to create a temporary LA script file? Then use the HTTP service above to call the function?

Should calling functions using HTTP services be the fastest compared to other methods while LA is running?


Macro Macro9
Code:
Copy      Help
str cs5=
;using System;
;public class Test
;{
;,public static string Main(string p)
;,{
;,,string r = String.Format("hello {0}", p);
;,,Console.WriteLine(r);
;,,return r;
;,}
;}
CsScript x.AddCode(cs5)
str p="Lisa"
str R=x.Call("Main" p)
out R
;__________________________________________________________________Todo:

str cs8=
;using System;
;public class Test
;{
;,public static string Main(string name)
;,{
;,,string r=$"hello {name}";
;,,Console.WriteLine(r);
;,,return r;
;,}
;}

;Todo: Call the Main function in the cs8 code in LA through http
;CallLa(cs8 "Main" "Lisa")


Messages In This Thread
Compile and run C# code string sent from QM to the LA HTTP server - by Davider - 06-20-2023, 05:29 AM

Forum Jump:


Users browsing this thread: 6 Guest(s)