/// <summary> /// Renders template to string /// </summary> public string RenderToString(bool encodeHtml = true, object model = null) { var target = new NFX.Templatization.StringRenderingTarget(encodeHtml); base.Render(target, model); return(target.Value); }
/// <summary> /// Renders template to string in a WorkContext /// </summary> public string RenderToString(WorkContext work, bool encodeHtml = true, object model = null) { this.BindGlobalContexts(work); var target = new NFX.Templatization.StringRenderingTarget(encodeHtml); base.Render(target, model); return(target.Value); }