internal static TemplateBase CreateInstanceFromVirtualPath(string virtualPath, VirtualPathFactoryManager manager) { TemplateBase template = manager.CreateInstance <TemplateBase>(virtualPath); template.VirtualPath = virtualPath; return(template); }
private TemplateResult RenderPageCore(string path, bool isLayoutPage, object[] data) { Precondition.Defined(path, () => Error.ArgumentNull("path")); return(new TemplateResult(writer => { path = NormalizePath(path); //Util.EnsureValidPageType(this, path); TemplateBase subPage = CreatePageFromVirtualPath(path); var pageContext = CreatePageContextFromParameters(isLayoutPage, data); subPage.Configure(this); subPage.ExecutePageHierarchy(pageContext, writer); })); }
protected virtual void Configure(TemplateBase parentPage) { }