public static void MapRoutes(RouteCollection routes, ContextualPublishedCache umbracoCache)
        {
            //find all articulate root nodes
            var articulateNodes = umbracoCache.GetByXPath("//Articulate").ToArray();

            //NOTE: need to write lock because this might need to be remapped while the app is running if
            // any articulate nodes are updated with new values
            using (routes.GetWriteLock())
            {
                //clear the existing articulate routes (if any)
                RemoveExisting(routes);

                // For each articulate root, we need to create some custom route, BUT routes can overlap
                // based on multi-tenency so we need to deal with that.
                // For example a root articulate node might yield a route like:
                //      /
                // and another articulate root node that has a domain might have this url:
                //      http://mydomain/
                // but when that is processed through RoutePathFromNodeUrl, it becomes:
                //      /
                // which already exists and is already assigned to a specific node ID.
                // So what we need to do in these cases is use a special route handler that takes
                // into account the domain assigned to the route.
                var groups = articulateNodes
                    .GroupBy(x => RouteCollectionExtensions.RoutePathFromNodeUrl(x.Url))
                    //This is required to ensure that we create routes that are more specific first
                    // before creating routes that are less specific
                    .OrderByDescending(x => x.Key.Split('/').Length);
                foreach (var grouping in groups)
                {
                    var nodesAsArray = grouping.ToArray();

                    MapRssRoute(routes, grouping.Key, nodesAsArray);
                    MapSearchRoute(routes, grouping.Key, nodesAsArray);
                    MapTagsAndCategoriesRoute(routes, grouping.Key, nodesAsArray);
                    MapMarkdownEditorRoute(routes, grouping.Key, nodesAsArray);

                    foreach (var content in grouping)
                    {
                        MapMetaWeblogRoute(routes, grouping.Key, content);
                        MapManifestRoute(routes, grouping.Key, content);
                        MapRsdRoute(routes, grouping.Key, content);
                    }

                }
            }
        }
        public static void MapRoutes(RouteCollection routes, ContextualPublishedCache umbracoCache)
        {
            //find all Dialogue forum root nodes - Testing adding new line
            var dialogueNodes = umbracoCache.GetByXPath(string.Concat("//", AppConstants.DocTypeForumRoot)).ToArray();
           

            //NOTE: need to write lock because this might need to be remapped while the app is running if
            // any articulate nodes are updated with new values
            using (routes.GetWriteLock())
            {
                //clear the existing articulate routes (if any)
                RemoveExisting(routes);

                // For each articulate root, we need to create some custom route, BUT routes can overlap
                // based on multi-tenency so we need to deal with that. 
                // For example a root articulate node might yield a route like:
                //      /
                // and another articulate root node that has a domain might have this url:
                //      http://mydomain/
                // but when that is processed through RoutePathFromNodeUrl, it becomes:
                //      /
                // which already exists and is already assigned to a specific node ID.
                // So what we need to do in these cases is use a special route handler that takes
                // into account the domain assigned to the route.
                var groups = dialogueNodes.GroupBy(x => RouteCollectionExtensions.RoutePathFromNodeUrl(x.Url));
                foreach (var grouping in groups)
                {
                    var nodesAsArray = grouping.ToArray();

                    MapTopicRoute(routes, grouping.Key, nodesAsArray);
                    MapDialoguePages(routes, grouping.Key, nodesAsArray);
                    MapMemberRoute(routes, grouping.Key, nodesAsArray);
                }
            }

        }
 private dynamic DocumentsByXPath(XPathExpression xpath, XPathVariable[] vars, ContextualPublishedCache cache)
 {
     return new DynamicPublishedContentList(
         cache.GetByXPath(xpath, vars)
              .Select(publishedContent => new DynamicPublishedContent(publishedContent))
         );
 }