示例#1
0
文件: WaveTemplate.cs 项目: rioka/nfx
        /// <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);
        }
示例#2
0
文件: WaveTemplate.cs 项目: rioka/nfx
        /// <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);
        }