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


C# ContentItem.GetChild方法代码示例

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


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

示例1: Navigate

		public virtual ContentItem Navigate(ContentItem startingPoint, string path)
		{
			return startingPoint.GetChild(path)
				?? sources.ResolvePath(startingPoint, path).CurrentItem
				?? virtualNodes.Get(startingPoint.Path + path.TrimStart('/'))
				?? virtualNodes.Get(path);
		}
开发者ID:nagarjunachallapalli,项目名称:n2cms,代码行数:7,代码来源:Navigator.cs

示例2: GetChild

		protected override ContentItem GetChild(ContentItem item)
		{
			ContentItem childItem = item.GetChild(DefaultChildName);
			if (childItem == null)
			{
				childItem = CreateChild(item, ChildType);
			}
			return childItem;
		}
开发者ID:navneetccna,项目名称:n2cms,代码行数:9,代码来源:WithEditableChildAttribute.cs

示例3: Parse

        protected virtual ContentItem Parse(ContentItem current, string url)
        {
            if (current == null) throw new ArgumentNullException("current");

            Debug.WriteLine("Parsing " + url);
            url = CleanUrl(url);

            if (url.Length == 0)
                return current;

            return current.GetChild(url) ?? NotFoundPage(url);
        }
开发者ID:joaohortencio,项目名称:n2cms,代码行数:12,代码来源:UrlParser.cs

示例4: Navigate

 public ContentItem Navigate(ContentItem startingPoint, string path)
 {
     return startingPoint.GetChild(path)
         ?? virtualNodes.Get(path);
 }
开发者ID:sergheizagaiciuc,项目名称:n2cms,代码行数:5,代码来源:Navigator.cs

示例5: IsNameOccupiedOnDestination

		/// <summary>Checks that destination have no child item with the same name.</summary>
		public virtual bool IsNameOccupiedOnDestination(ContentItem source, ContentItem destination, bool excludeMyself = true)
		{
			if (source == null) throw new ArgumentNullException("source");
			if (destination == null) throw new ArgumentNullException("destination");

			ContentItem existingItem = destination.GetChild(source.Name);

			if (existingItem == null)
				return false;
			if (excludeMyself && existingItem == source)
				return false;
			if (!excludeMyself && source.Name == source.ID.ToString())
				return false;

			return true;
		}
开发者ID:grbbod,项目名称:drconnect-jungo,代码行数:17,代码来源:IntegrityManager.cs

示例6: Navigate

 public ContentItem Navigate(ContentItem startingPoint, string path)
 {
     return startingPoint.GetChild(path)
         ?? virtualNodes.Get(startingPoint.Path + path.TrimStart('/'))
         ?? virtualNodes.Get(path);
 }
开发者ID:jamesbroome,项目名称:n2cms,代码行数:6,代码来源:Navigator.cs

示例7: Parse

		protected virtual ContentItem Parse(ContentItem current, Url url)
		{
			if (current == null) throw new ArgumentNullException("current");
			logger.Debug("Parsing " + url);
			var path = CleanUrl(url.PathAndQuery);

			if (path.Length == 0)
				return current;
			
			return current.GetChild(path) 
				?? NotFoundPage(url);
		}
开发者ID:nagarjunachallapalli,项目名称:n2cms,代码行数:12,代码来源:UrlParser.cs

示例8: IsNameOccupiedOnDestination

        /// <summary>Checks that destination have no child item with the same name.</summary>
        public virtual bool IsNameOccupiedOnDestination(ContentItem source, ContentItem destination)
        {
            if (source == null) throw new ArgumentNullException("source");
            if (destination == null) throw new ArgumentNullException("destination");

            ContentItem existingItem = destination.GetChild(source.Name);
            return existingItem != null && existingItem != source;
        }
开发者ID:spmason,项目名称:n2cms,代码行数:9,代码来源:IntegrityManager.cs

示例9: Parse

        protected virtual ContentItem Parse(ContentItem current, string url)
        {
            if (current == null) throw new ArgumentNullException("current");

            url = CleanUrl(url);

            if (url.Length == 0)
                return current;

            // Check if start of URL contains a language identifier.
            foreach (Language language in Context.Current.LanguageManager.GetAvailableLanguages())
                if (url.StartsWith(language.Name, StringComparison.InvariantCultureIgnoreCase))
                    throw new NotImplementedException();

            return current.GetChild(url) ?? NotFoundPage(url);
        }
开发者ID:dpawatts,项目名称:zeus,代码行数:16,代码来源:UrlParser.cs


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