Click or drag to resize

RazorCoreEngineCheckSyntax Method

Compile 'script' for a syntax check only: nothing is cached or persisted. A compilation failure throws the same TemplateCompilationException as Compile. On success, returns the compiler warnings located in the script and the generated C# code (to map RazorEngineCompilerError.Line). RazorEngineCore drops the diagnostics of a successful compilation, so the generated code is analyzed again with Roslyn (no emit).

Namespace: Seal.Helpers
Assembly: SealLibrary (in SealLibrary.dll) Version: 10.2.0.0+da7797057e6d5ef3b02633ee3e36991921c726cb
Syntax
C#
public static List<RazorEngineCompilerError> CheckSyntax(
	string script,
	out string generatedCode
)

Parameters

script  String
 
generatedCode  String
 

Return Value

ListRazorEngineCompilerError
See Also