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
#10
But why to store C# code in a QM macro? You can store it in LA. I want to know some reasons why people want to pass C# code to LA to compile and execute.

In LA Cookbook there is recipe "Use C# compiler at run time". Using that code you can create a function that compiles and executes code passed from QM or elsewhere. Will need to install the NuGet package (the easy way) or add references to the LA compiler dlls; they are in LA subfolder Roslyn.

The first call will take 1 or several seconds depending on computer speed. Then about 100 ms.

When C# code is in LA, the speed is about 1 ms. First time a little slower.


Messages In This Thread
RE: Call C# functions from anywhere using URL (HTTP server) - by Gintaras - 06-20-2023, 03:33 PM

Forum Jump:


Users browsing this thread: 7 Guest(s)