protected void SetAndRenderParentTemplate(String ParentTemplateFileName, TemplateContext Context) { this.ParentTemplate = Context.TemplateFactory.GetTemplateCodeByFile(ParentTemplateFileName); this.ParentTemplate.ChildTemplate = this; this.ParentTemplate.LocalRender(Context); throw (new FinalizeRenderException()); }
async protected Task SetAndRenderParentTemplateAsync(String ParentTemplateFileName, TemplateContext Context) { this.ParentTemplate = await Context.TemplateFactory.GetTemplateCodeByFileAsync(ParentTemplateFileName); this.ParentTemplate.ChildTemplate = this; await this.ParentTemplate.LocalRenderAsync(Context); throw (new FinalizeRenderException()); }
protected void SetAndRenderParentTemplate(String ParentTemplateFileName, TemplateContext Context) { this.ParentTemplate = Context.TemplateFactory.GetTemplateCodeByFile(ParentTemplateFileName); this.ParentTemplate.ChildTemplate = this; #if NET_4_5 this.ParentTemplate.LocalRenderAsync(Context); #else this.ParentTemplate.LocalRender(Context); #endif throw (new FinalizeRenderException()); }