ExecutePageHierarchy() private method

private ExecutePageHierarchy ( ) : void
return void
Beispiel #1
0
        private HelperResult RenderPageCore(string path, bool isLayoutPage, object[] data)
        {
            if (String.IsNullOrEmpty(path))
            {
                throw new ArgumentException(
                          CommonResources.Argument_Cannot_Be_Null_Or_Empty,
                          "path"
                          );
            }

            return(new HelperResult(
                       writer =>
            {
                path = NormalizePath(path);
                WebPageBase subPage = CreatePageFromVirtualPath(
                    path,
                    Context,
                    VirtualPathFactory.Exists,
                    DisplayModeProvider,
                    DisplayMode
                    );
                var pageContext = CreatePageContextFromParameters(isLayoutPage, data);

                subPage.ConfigurePage(this);
                subPage.ExecutePageHierarchy(pageContext, writer);
            }
                       ));
        }
Beispiel #2
0
        private HelperResult RenderPageCore(string path, bool isLayoutPage, object[] data)
        {
            if (String.IsNullOrEmpty(path))
            {
                throw ExceptionHelper.CreateArgumentNullOrEmptyException("path");
            }

            return(new HelperResult(writer => {
                path = NormalizePath(path);
                Util.EnsureValidPageType(this, path);

                WebPageBase subPage = CreatePageFromVirtualPath(path);
                var pageContext = CreatePageContextFromParameters(isLayoutPage, data);

                subPage.ConfigurePage(this);
                subPage.ExecutePageHierarchy(pageContext, writer);
            }));
        }
 public void RazorRender(WebPageBase Webpage, TextWriter writer, dynamic model)
 {
     var HttpContext = new HttpContextWrapper(System.Web.HttpContext.Current);
     if ((Webpage) is DotNetNukeWebPage<dynamic>)
     {
         var mv = (DotNetNukeWebPage<dynamic>)Webpage;
         mv.Model = model;
     }
     if (Webpage != null)
         Webpage.ExecutePageHierarchy(new WebPageContext(HttpContext, Webpage, null), writer, Webpage);
 }