ScriptParser.ExecuteScript

Executes a script that supports {{ expression }} and {{% code block }} syntax and returns a string result.

You can optionally pass in a pre-configured CSharpScriptExecution instance which allows setting references/namespaces and can capture error information.

Function returns null on error and scriptEngine.Error is set to true along with the error message and the generated code.

public string ExecuteScript<TModelType>(string script, TModelType model, 
			CSharpScriptExecution scriptEngine, string basePath)

Overloads