KestrunHostScriptValidationExtensions.GetCSharpScriptErrors method
Gets formatted error information for a C# script.
public static string? GetCSharpScriptErrors(this KestrunHost host, string code,
string[]? extraImports = null, Assembly[]? extraRefs = null,
LanguageVersion languageVersion = LanguageVersion.CSharp12)
| parameter | description |
|---|---|
| host | The KestrunHost instance used for validation |
| code | The C# script code to check |
| extraImports | Optional additional imports |
| extraRefs | Optional additional assembly references |
| languageVersion | C# language version to use |
Return Value
Formatted error message, or null if no errors
See Also
- class KestrunHost
- class KestrunHostScriptValidationExtensions
- namespace Kestrun.Hosting