コード例 #1
0
 public void AddNode(SiteMapNodeInfo node, SiteMapNodeInfo parent, int preferredDisplayOrder)
 {
     this.SafeAddNode(node);
     if (!this._childNodes.ContainsKey(parent.Key))
     {
         this._childNodes.Add(parent.Key, new List<SiteMapNodeInfo>());
     }
     this.AddNodeWithOrder(parent.Key, node, preferredDisplayOrder);
 }
コード例 #2
0
 public void AddNode(SiteMapNodeInfo node, SiteMapNodeInfo parent, string authorizationRule, int preferredDisplayOrder)
 {
     this.AddNode(node, parent, preferredDisplayOrder);
     this._nodeAuthorization.Add(node.Key, authorizationRule);
 }
コード例 #3
0
 public void AddNode(SiteMapNodeInfo node, string authorizationRule, int preferredDisplayOrder)
 {
     Guard.IsNotNullNorEmpty(authorizationRule, "authorizationRule");
     this.AddNode(node, preferredDisplayOrder);
     this._nodeAuthorization.Add(node.Key, authorizationRule);
 }
コード例 #4
0
 public void AddNode(SiteMapNodeInfo node, SiteMapNodeInfo parent, string authorizationRule)
 {
     this.AddNode(node, parent, authorizationRule, 0x7fffffff);
 }
コード例 #5
0
 public void AddNode(SiteMapNodeInfo node, int preferredDisplayOrder)
 {
     this.SafeAddNode(node);
     this.AddNodeWithOrder(this.RootNode.Key, node, preferredDisplayOrder);
 }
コード例 #6
0
 public void AddNode(SiteMapNodeInfo node, SiteMapNodeInfo parent)
 {
     this.AddNode(node, parent, 0x7fffffff);
 }
コード例 #7
0
 public void AddNode(SiteMapNodeInfo node)
 {
     this.AddNode(node, 0x7fffffff);
 }
コード例 #8
0
 private void SafeAddNode(SiteMapNodeInfo node)
 {
     Guard.IsNotNull(node, "node");
     if (this._keyIndex.ContainsKey(node.Key))
     {
         throw new ApplicationException("Duplicate key");
     }
     this._keyIndex.Add(node.Key, node);
 }
コード例 #9
0
 private void AddNodeWithOrder(string parentKey, SiteMapNodeInfo node, int preferredDisplayOrder)
 {
     this._nodePreferredOrder.Add(node.Key, preferredDisplayOrder);
     for (int i = 0; i < this._childNodes[parentKey].Count; i++)
     {
         string key = this._childNodes[parentKey][i].Key;
         if (this._nodePreferredOrder[key] > preferredDisplayOrder)
         {
             this._childNodes[parentKey].Insert(i, node);
             return;
         }
     }
     this._childNodes[parentKey].Add(node);
 }
コード例 #10
0
ファイル: SiteMapProvider.cs プロジェクト: rag2111/Hexa.Core
 private SiteMapNode CreateSiteMapNode(SiteMapNodeInfo nodeInfo)
 {
     return new SiteMapNode(this, nodeInfo.Key, nodeInfo.Url, nodeInfo.Title,
                            nodeInfo.Description, nodeInfo.Roles, nodeInfo.Attributes,
                            nodeInfo.ExplicitResourcesKey, nodeInfo.ImplicitResourceKey
                           );
 }