protected virtual ISiteMapNodeToParentRelation CreateNodeFromAttributeDefinition(IMvcSiteMapNodeAttributeDefinition definition, ISiteMapNodeHelper helper) { ISiteMapNodeToParentRelation result = null; // Create node var actionNode = definition as MvcSiteMapNodeAttributeDefinitionForAction; if (actionNode != null) { // Create node for action result = this.GetSiteMapNodeFromMvcSiteMapNodeAttribute( actionNode.SiteMapNodeAttribute, actionNode.ControllerType, actionNode.ActionMethodInfo, helper); } else { var controllerNode = definition as MvcSiteMapNodeAttributeDefinitionForController; if (controllerNode != null) { // Create node for controller result = this.GetSiteMapNodeFromMvcSiteMapNodeAttribute( controllerNode.SiteMapNodeAttribute, controllerNode.ControllerType, null, helper); } } return(result); }
protected virtual void AddAndTrackNode( ISiteMap siteMap, ISiteMapNodeToParentRelation nodeParentMap, ISiteMapNode parentNode, IList <ISiteMapNodeToParentRelation> sourceNodes, HashSet <string> nodesAlreadyAdded) { siteMap.AddNode(nodeParentMap.Node, parentNode); nodesAlreadyAdded.Add(nodeParentMap.Node.Key); sourceNodes.Remove(nodeParentMap); }
protected virtual void AddAndTrackNode( ISiteMap siteMap, ISiteMapNodeToParentRelation nodeParentMap, ISiteMapNode parentNode, IList<ISiteMapNodeToParentRelation> sourceNodes, HashSet<string> nodesAlreadyAdded) { siteMap.AddNode(nodeParentMap.Node, parentNode); nodesAlreadyAdded.Add(nodeParentMap.Node.Key); sourceNodes.Remove(nodeParentMap); }
protected virtual IEnumerable <ISiteMapNodeToParentRelation> ProcessNodes(ISiteMapNodeToParentRelation parentNode, System.Web.SiteMapNode providerParentNode, ISiteMapNodeHelper helper) { var result = new List <ISiteMapNodeToParentRelation>(); foreach (System.Web.SiteMapNode childNode in providerParentNode.ChildNodes) { var node = GetSiteMapNodeFromProviderNode(childNode, parentNode.Node, helper); result.Add(node); // Continue recursively processing ProcessNodes(node, childNode, helper); } return(result); }
protected virtual IEnumerable<ISiteMapNodeToParentRelation> ProcessNodes(ISiteMapNodeToParentRelation parentNode, System.Web.SiteMapNode providerParentNode, ISiteMapNodeHelper helper) { var result = new List<ISiteMapNodeToParentRelation>(); foreach (System.Web.SiteMapNode childNode in providerParentNode.ChildNodes) { var node = GetSiteMapNodeFromProviderNode(childNode, parentNode.Node, helper); result.Add(node); // Continue recursively processing ProcessNodes(node, childNode, helper); } return result; }
public IEnumerable<ISiteMapNodeToParentRelation> CreateDynamicNodes(ISiteMapNodeToParentRelation node, string defaultParentKey) { var dynamicSiteMapNodeBuilder = this.dynamicSiteMapNodeBuilderFactory.Create(this.siteMap, this.CultureContext); return dynamicSiteMapNodeBuilder.BuildDynamicNodes(node.Node, defaultParentKey); }
public IEnumerable<ISiteMapNodeToParentRelation> CreateDynamicNodes(ISiteMapNodeToParentRelation node) { return this.CreateDynamicNodes(node, node.ParentKey); }
public IEnumerable <ISiteMapNodeToParentRelation> CreateDynamicNodes(ISiteMapNodeToParentRelation node, string defaultParentKey) { var dynamicSiteMapNodeBuilder = this.dynamicSiteMapNodeBuilderFactory.Create(this.siteMap, this.CultureContext); return(dynamicSiteMapNodeBuilder.BuildDynamicNodes(node.Node, defaultParentKey)); }
public IEnumerable <ISiteMapNodeToParentRelation> CreateDynamicNodes(ISiteMapNodeToParentRelation node) { return(this.CreateDynamicNodes(node, node.ParentKey)); }