static private RunPage ( |
||
context | ||
path | string | |
pageNode | ||
exception | ||
return | void |
internal static void RunPage(HttpContext context, string path, Page pageNode, out Exception exception)
{
PageBase page = null;
string virtualPath = string.Empty;
// prepare repository path
try
{
virtualPath = CreateVirtualPath(path);
page = InstantiatePage(context, virtualPath, pageNode);
ExecutePage(context, virtualPath, page, pageNode, false);
exception = null;
}
catch (Exception exc) //logged
{
Logger.WriteException(exc);
exception = exc;
}
}
public static string[] RunPagesBackground(HttpContext context, out Exception[] exceptions) { var pages = GetAllPage(); string[] result = new string[pages.Count]; List <string> pageList = new List <string>(); List <Exception> exceptionList = new List <Exception>(); foreach (Node pageItem in pages.Nodes) { Exception exc = null; Page p = (Page)pageItem; if (p != null && p.HasTemporaryPortletInfo) { Site site = p.Site; if (site != null) { Page.RunPage(HttpContext.Current, p.Path, p, out exc); pageList.Add(p.Path); if (exc != null) { exceptionList.Add(exc); } } } } pageList.CopyTo(result, 0); exceptions = exceptionList.ToArray(); return(result); }