Пример #1
0
        internal static TemplateBase CreateInstanceFromVirtualPath(string virtualPath, VirtualPathFactoryManager manager)
        {
            TemplateBase template = manager.CreateInstance <TemplateBase>(virtualPath);

            template.VirtualPath = virtualPath;

            return(template);
        }
Пример #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);
            }));
        }
Пример #3
0
 protected virtual void Configure(TemplateBase parentPage)
 {
 }