Exemplo n.º 1
0
        internal static TemplateBase CreateInstanceFromVirtualPath(string virtualPath, VirtualPathFactoryManager manager)
        {
            TemplateBase template = manager.CreateInstance <TemplateBase>(virtualPath);

            template.VirtualPath = virtualPath;

            return(template);
        }
Exemplo n.º 2
0
        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);
            }));
        }
Exemplo n.º 3
0
 protected virtual void Configure(TemplateBase parentPage)
 {
 }