SenseNet.Portal.Page.RunPagesBackground C# (CSharp) Method

RunPagesBackground() public static method

public static RunPagesBackground ( HttpContext context, Exception &exceptions ) : string[]
context System.Web.HttpContext
exceptions System.Exception
return string[]
        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;
        }