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;
}