From dcdd61ea62a37c30134e7a21b238daa65a0145cf Mon Sep 17 00:00:00 2001 From: Sipke Schoorstra Date: Wed, 13 Nov 2024 20:14:19 +0100 Subject: [PATCH] Disable variable wrappers in CSharp options This change adds a line to disable variable wrappers in the CSharp options used in Elsa Server. This ensures scripts run without the overhead of variable wrappers, potentially improving performance. The adjustment simplifies the configuration and aligns with the project's need for optimized script execution. --- src/apps/Elsa.Server.Web/Program.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/apps/Elsa.Server.Web/Program.cs b/src/apps/Elsa.Server.Web/Program.cs index 895ed12d4..f2c19d8cf 100644 --- a/src/apps/Elsa.Server.Web/Program.cs +++ b/src/apps/Elsa.Server.Web/Program.cs @@ -309,6 +309,7 @@ services }) .UseCSharp(options => { + options.DisableWrappers = disableVariableWrappers; options.AppendScript("string Greet(string name) => $\"Hello {name}!\";"); options.AppendScript("string SayHelloWorld() => Greet(\"World\");"); })