Westwind.Scripting icon indicating copy to clipboard operation
Westwind.Scripting copied to clipboard

Replace word "using " problem

Open flypart opened this issue 1 year ago • 0 comments

Hello, thank you very much for providing this high quality library.

I'm having a problem with it.

I generated a code string and submitted it to script.ExecuteCodeAsync for execution.

If the string contains the word "using ", execution will get an error.

The "using" word is not used to refer to another namespace, but appears in the string definition, for example: string str = "I am using a folk";

In CSharpScriptExecution.cs at line 1574. The word "using" is trimmed and replaced directly.

When "using" appears inside a string or in a comment, the code may be broken.

Can you provide a switch to turn off this behavior?

flypart avatar Jan 29 '24 02:01 flypart