protected virtual void GetDescendantsInternal(ISiteMapNode node, ISiteMapNodeCollection descendants) { foreach (var child in node.ChildNodes) { descendants.Add(child); GetDescendantsInternal(child, descendants); } }
protected virtual void GetAncestorsInternal(ISiteMapNode node, ISiteMapNodeCollection ancestors) { if (node.ParentNode != null) { ancestors.Add(node.ParentNode); GetAncestorsInternal(node.ParentNode, ancestors); } }
public ReadOnlySiteMapNodeCollection( ISiteMapNodeCollection siteMapNodeCollection ) { if (siteMapNodeCollection == null) throw new ArgumentNullException("siteMapNodeCollection"); this.siteMapNodeCollection = siteMapNodeCollection; }
public ReadOnlySiteMapNodeCollection( ISiteMapNodeCollection siteMapNodeCollection ) { if (siteMapNodeCollection == null) { throw new ArgumentNullException("siteMapNodeCollection"); } this.siteMapNodeCollection = siteMapNodeCollection; }
public virtual ISiteMapNodeCollection GetChildNodes(ISiteMapNode node) { if (node == null) { throw new ArgumentNullException("node"); } ISiteMapNodeCollection collection = null; if (this.childNodeCollectionTable.ContainsKey(node)) { collection = this.childNodeCollectionTable[node]; } if (collection == null) { ISiteMapNode keyNode = null; if (this.keyTable.ContainsKey(node.Key)) { keyNode = this.keyTable[node.Key]; } if (keyNode != null && this.childNodeCollectionTable.ContainsKey(keyNode)) { collection = this.childNodeCollectionTable[keyNode]; } } if (collection == null) { return(siteMapChildStateFactory.CreateEmptyReadOnlySiteMapNodeCollection()); } if (!this.SecurityTrimmingEnabled) { return(siteMapChildStateFactory.CreateReadOnlySiteMapNodeCollection(collection)); } var secureCollection = siteMapChildStateFactory.CreateSiteMapNodeCollection(); foreach (ISiteMapNode secureNode in collection) { if (secureNode.IsAccessibleToUser()) { secureCollection.Add(secureNode); } } return(siteMapChildStateFactory.CreateReadOnlySiteMapNodeCollection(secureCollection)); }
public virtual ISiteMapNodeCollection CreateReadOnly(ISiteMapNodeCollection siteMapNodeCollection) { return(new ReadOnlySiteMapNodeCollection(siteMapNodeCollection)); }
public virtual ISiteMapNodeCollection CreateReadOnlySiteMapNodeCollection(ISiteMapNodeCollection siteMapNodeCollection) { return siteMapNodeCollectionFactory.CreateReadOnly(siteMapNodeCollection); }
public ISiteMapNodeCollection CreateReadOnlySiteMapNodeCollection(ISiteMapNodeCollection siteMapNodeCollection) { return(siteMapNodeCollectionFactory.CreateReadOnly(siteMapNodeCollection)); }
public virtual ISiteMapNodeCollection CreateReadOnly(ISiteMapNodeCollection siteMapNodeCollection) { return new ReadOnlySiteMapNodeCollection(siteMapNodeCollection); }