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
#5
Currently, I using the following method, but it is slow and takes 4 seconds (LinqPad7 is in the open state.)
I need to execute quickly enough!


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

cs8.setfile("$desktop$\LP7\cs8.linq")
str cl=
;lprun7 -lang=P cs8.linq "Lisa"
RunConsole2 cl _s "$desktop$\LP7"
out _s

The above solution conveys a relatively single data type, and using LA should be faster and more convenient, Can someone provide an example? Thank you

Using the CS-Script class library, combined with the following code, may be more flexible, but it requires referencing a lot of dlls...

https://github.com/oleg-shilo/cs-script....samples.cs


Messages In This Thread
RE: Call C# functions from anywhere using URL (HTTP server) - by Davider - 06-20-2023, 09:47 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)