예제 #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
 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
                           );
 }