RazorEngine<TBaseTemplateType>.RenderTemplate

Execute a template based on a TextReader input into a provided TextWriter object.

public string RenderTemplate(TextReader templateSourceReader,
	object model,
	TextWriter outputWriter)

Return Value

output from template. If an outputWriter is passed in result is string.Empty on success, null on failure

Parameters

templateSourceReader
model
Optional model available in the template as this.Context

outputWriter
A text writer that receives the rendered template output. Writer is closed after rendering. When provided the result of this method is string.Empty (success) or null (failure)

Overloads:


See also:

Class RazorEngine

© West Wind Technologies, 2018 • Updated: 06/07/18
Comment or report problem with topic