RazorBaseHostContainer<TBaseTemplateType>.RenderTemplate

Stock implementation of RenderTemplate that doesn't allow for any sort of assembly caching. Instead it creates and re-renders templates read from the reader each time.

Custom implementations of RenderTemplate should be created that allow for caching by examing a filename or string hash to determine whether a template needs to be re-generated and compiled before rendering.

public virtual bool RenderTemplate(TextReader reader,
	object model,
	TextWriter writer)

Parameters

reader
TextReader that points at the template to compile

model
Optional model data to pass to template

writer
TextReader passed in that receives output


See also:

Class RazorBaseHostContainer

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