当前位置: 首页>>代码示例>>C#>>正文


C# SiteMapNode.ToString方法代码示例

本文整理汇总了C#中System.Web.SiteMapNode.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# SiteMapNode.ToString方法的具体用法?C# SiteMapNode.ToString怎么用?C# SiteMapNode.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Web.SiteMapNode的用法示例。


在下文中一共展示了SiteMapNode.ToString方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: AddNode

 protected internal override void AddNode(SiteMapNode node, SiteMapNode parentNode)
 {
     if (node == null)
     {
         throw new ArgumentNullException("node");
     }
     if (parentNode == null)
     {
         throw new ArgumentNullException("parentNode");
     }
     SiteMapProvider provider = node.Provider;
     SiteMapProvider provider2 = parentNode.Provider;
     if (provider != this)
     {
         throw new ArgumentException(System.Web.SR.GetString("XmlSiteMapProvider_cannot_add_node", new object[] { node.ToString() }), "node");
     }
     if (provider2 != this)
     {
         throw new ArgumentException(System.Web.SR.GetString("XmlSiteMapProvider_cannot_add_node", new object[] { parentNode.ToString() }), "parentNode");
     }
     lock (base._lock)
     {
         this.RemoveNode(node);
         this.AddNodeInternal(node, parentNode, null);
     }
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:26,代码来源:XmlSiteMapProvider.cs

示例2: RemoveNode

 /// <summary>
 /// Removes the specified <see cref="T:System.Web.SiteMapNode"/> object from all site map node collections that are tracked by the site map provider.
 /// </summary>
 /// <param name="node">The site map node to remove from the site map node collections.</param>
 /// <exception cref="T:System.ArgumentNullException">
 ///   <paramref name="node"/> is null.
 ///   </exception>
 protected override void RemoveNode(SiteMapNode node)
 {
     if (node == null)
         throw new ArgumentNullException("node");
     var provider = node.Provider;
     if (provider != this)
         for (var parentProvider = provider.ParentProvider; parentProvider != this; parentProvider = parentProvider.ParentProvider)
             if (parentProvider == null)
                 throw new InvalidOperationException(string.Format("StaticSiteMapProviderEx_cannot_remove_node", node.ToString(), Name, provider.Name));
     if (node.Equals(provider.RootNode))
         throw new InvalidOperationException("StaticSiteMapProviderEx_cannot_remove_root_node");
     if (provider != this)
         _providerRemoveNode.Invoke(provider, new[] { node });
     base.RemoveNode(node);
 }
开发者ID:BclEx,项目名称:BclEx-Web,代码行数:22,代码来源:StaticSiteMapProviderEx+ChildProvider.cs

示例3: AddProvider

 /// <summary>
 /// Adds the provider.
 /// </summary>
 /// <param name="providerName">Name of the provider.</param>
 /// <param name="parentNode">The parent node.</param>
 /// <param name="rebaseAction">The rebase action.</param>
 public void AddProvider(string providerName, SiteMapNode parentNode, Action<SiteMapNode> rebaseAction)
 {
     if (parentNode == null)
         throw new ArgumentNullException("parentNode");
     if (parentNode.Provider != this)
         throw new ArgumentException(string.Format("StaticSiteMapProviderEx_cannot_add_node", parentNode.ToString()), "parentNode");
     var rootNode = GetNodeFromProvider(providerName, rebaseAction);
     AddNode(rootNode, parentNode);
 }
开发者ID:BclEx,项目名称:BclEx-Web,代码行数:15,代码来源:StaticSiteMapProviderEx+ChildProvider.cs

示例4: RemoveNode

        protected internal override void RemoveNode(SiteMapNode node) {
            if (node == null) {
                throw new ArgumentNullException("node");
            }

            SiteMapProvider ownerProvider = node.Provider;

            if (ownerProvider != this) {

                // Only nodes defined in this provider tree can be removed.
                SiteMapProvider parentProvider = ownerProvider.ParentProvider;
                while (parentProvider != this) {
                    if (parentProvider == null) {
                        // Cannot remove nodes defined in other providers
                        throw new InvalidOperationException(
                            SR.GetString(SR.XmlSiteMapProvider_cannot_remove_node, node.ToString(), 
                            this.Name, ownerProvider.Name));
                    }

                    parentProvider = parentProvider.ParentProvider;
                }
            }

            if (node.Equals(ownerProvider.GetRootNodeCore())) {
                throw new InvalidOperationException(SR.GetString(SR.SiteMapProvider_cannot_remove_root_node));
            }

            if (ownerProvider != this) {
                // Remove node from the owner provider.
                ownerProvider.RemoveNode(node);
            }

            base.RemoveNode(node);
        }
开发者ID:ItsVeryWindy,项目名称:mono,代码行数:34,代码来源:XmlSiteMapProvider.cs

示例5: AddProvider

        protected virtual void AddProvider(string providerName, SiteMapNode parentNode) {
            if (parentNode == null) {
                throw new ArgumentNullException("parentNode");
            }

            if (parentNode.Provider != this) {
                throw new ArgumentException(SR.GetString(SR.XmlSiteMapProvider_cannot_add_node, parentNode.ToString()), "parentNode");
            }

            SiteMapNode node = GetNodeFromProvider(providerName);
            AddNodeInternal(node, parentNode, null);
        }
开发者ID:ItsVeryWindy,项目名称:mono,代码行数:12,代码来源:XmlSiteMapProvider.cs

示例6: AddNode

        protected internal override void AddNode(SiteMapNode node, SiteMapNode parentNode) {
            if (node == null) {
                throw new ArgumentNullException("node");
            }

            if (parentNode == null) {
                throw new ArgumentNullException("parentNode");
            }

            SiteMapProvider ownerProvider = node.Provider;
            SiteMapProvider parentOwnerProvider = parentNode.Provider;

            if (ownerProvider != this) {
                throw new ArgumentException(SR.GetString(SR.XmlSiteMapProvider_cannot_add_node, node.ToString()), "node");
            }

            if (parentOwnerProvider != this) {
                throw new ArgumentException(SR.GetString(SR.XmlSiteMapProvider_cannot_add_node, parentNode.ToString()), "parentNode");
            }

            lock (_lock) {
                // First remove it from its current location.
                RemoveNode(node);
                AddNodeInternal(node, parentNode, null);
            }
        }
开发者ID:ItsVeryWindy,项目名称:mono,代码行数:26,代码来源:XmlSiteMapProvider.cs

示例7: RemoveNode

 protected internal override void RemoveNode(SiteMapNode node)
 {
     if (node == null)
     {
         throw new ArgumentNullException("node");
     }
     SiteMapProvider provider = node.Provider;
     if (provider != this)
     {
         for (SiteMapProvider provider2 = provider.ParentProvider; provider2 != this; provider2 = provider2.ParentProvider)
         {
             if (provider2 == null)
             {
                 throw new InvalidOperationException(System.Web.SR.GetString("XmlSiteMapProvider_cannot_remove_node", new object[] { node.ToString(), this.Name, provider.Name }));
             }
         }
     }
     if (node.Equals(provider.GetRootNodeCore()))
     {
         throw new InvalidOperationException(System.Web.SR.GetString("SiteMapProvider_cannot_remove_root_node"));
     }
     if (provider != this)
     {
         provider.RemoveNode(node);
     }
     base.RemoveNode(node);
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:27,代码来源:XmlSiteMapProvider.cs

示例8: AddProvider

 protected virtual void AddProvider(string providerName, SiteMapNode parentNode)
 {
     if (parentNode == null)
     {
         throw new ArgumentNullException("parentNode");
     }
     if (parentNode.Provider != this)
     {
         throw new ArgumentException(System.Web.SR.GetString("XmlSiteMapProvider_cannot_add_node", new object[] { parentNode.ToString() }), "parentNode");
     }
     SiteMapNode nodeFromProvider = this.GetNodeFromProvider(providerName);
     this.AddNodeInternal(nodeFromProvider, parentNode, null);
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:13,代码来源:XmlSiteMapProvider.cs


注:本文中的System.Web.SiteMapNode.ToString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。