Class RazorStringHostContainer<TBaseTemplate>

Razor Host container to execute Razor Templates from string input.

Can run templates in a separate AppDomain and caches templates to avoid re-compilation and allocation of new resources for each template.

System.Object
  System.MarshalByRefObject
    Westwind.RazorHosting.RazorBaseHostContainer<TBaseTemplate>
      Westwind.RazorHosting.RazorStringHostContainer<TBaseTemplate>
public class RazorStringHostContainer<TBaseTemplate> : RazorBaseHostContainer<TBaseTemplate>

Class Members

MemberDescription

Constructor

RenderTemplate

Call this method to actually render a template to the specified outputfile

public string RenderTemplate(string templateText,     object model,     TextWriter writer,     bool inferModelType)

RenderTemplateToFile

Renders a template from a string input to a file output. Same text templates are compiled and cached for re-use.

public bool RenderTemplateToFile(string templateText,     object model,     string outputFile,     bool inferModelType)

Requirements

Namespace: Westwind.RazorHosting
Assembly: westwind.razorhosting.dll

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