November Happy Hour will be moved to Thursday December 5th.

Class ContentPath

A collection of ContentReferences to represents the content item and it's ancestors.

Inheritance
System.Object
System.Collections.ObjectModel.Collection<ContentReference>
ContentPath
Implements
System.Collections.Generic.IList<ContentReference>
System.Collections.Generic.ICollection<ContentReference>
System.Collections.IList
System.Collections.ICollection
System.Collections.Generic.IReadOnlyList<ContentReference>
System.Collections.Generic.IReadOnlyCollection<ContentReference>
System.Collections.Generic.IEnumerable<ContentReference>
System.Collections.IEnumerable
Inherited Members
System.Collections.ObjectModel.Collection<EPiServer.Core.ContentReference>.Add(EPiServer.Core.ContentReference)
System.Collections.ObjectModel.Collection<EPiServer.Core.ContentReference>.Clear()
System.Collections.ObjectModel.Collection<EPiServer.Core.ContentReference>.CopyTo(EPiServer.Core.ContentReference[], System.Int32)
System.Collections.ObjectModel.Collection<EPiServer.Core.ContentReference>.Contains(EPiServer.Core.ContentReference)
System.Collections.ObjectModel.Collection<EPiServer.Core.ContentReference>.GetEnumerator()
System.Collections.ObjectModel.Collection<EPiServer.Core.ContentReference>.IndexOf(EPiServer.Core.ContentReference)
System.Collections.ObjectModel.Collection<EPiServer.Core.ContentReference>.Insert(System.Int32, EPiServer.Core.ContentReference)
System.Collections.ObjectModel.Collection<EPiServer.Core.ContentReference>.Remove(EPiServer.Core.ContentReference)
System.Collections.ObjectModel.Collection<EPiServer.Core.ContentReference>.RemoveAt(System.Int32)
System.Collections.ObjectModel.Collection<EPiServer.Core.ContentReference>.ClearItems()
System.Collections.ObjectModel.Collection<EPiServer.Core.ContentReference>.InsertItem(System.Int32, EPiServer.Core.ContentReference)
System.Collections.ObjectModel.Collection<EPiServer.Core.ContentReference>.RemoveItem(System.Int32)
System.Collections.ObjectModel.Collection<EPiServer.Core.ContentReference>.SetItem(System.Int32, EPiServer.Core.ContentReference)
System.Collections.ObjectModel.Collection<EPiServer.Core.ContentReference>.System.Collections.IEnumerable.GetEnumerator()
System.Collections.ObjectModel.Collection<EPiServer.Core.ContentReference>.System.Collections.ICollection.CopyTo(System.Array, System.Int32)
System.Collections.ObjectModel.Collection<EPiServer.Core.ContentReference>.System.Collections.IList.get_Item(System.Int32)
System.Collections.ObjectModel.Collection<EPiServer.Core.ContentReference>.System.Collections.IList.set_Item(System.Int32, System.Object)
System.Collections.ObjectModel.Collection<EPiServer.Core.ContentReference>.System.Collections.IList.Add(System.Object)
System.Collections.ObjectModel.Collection<EPiServer.Core.ContentReference>.System.Collections.IList.Contains(System.Object)
System.Collections.ObjectModel.Collection<EPiServer.Core.ContentReference>.System.Collections.IList.IndexOf(System.Object)
System.Collections.ObjectModel.Collection<EPiServer.Core.ContentReference>.System.Collections.IList.Insert(System.Int32, System.Object)
System.Collections.ObjectModel.Collection<EPiServer.Core.ContentReference>.System.Collections.IList.Remove(System.Object)
System.Collections.ObjectModel.Collection<EPiServer.Core.ContentReference>.Count
System.Collections.ObjectModel.Collection<EPiServer.Core.ContentReference>.Items
System.Collections.ObjectModel.Collection<EPiServer.Core.ContentReference>.Item[System.Int32]
System.Collections.ObjectModel.Collection<EPiServer.Core.ContentReference>.System.Collections.Generic.ICollection<EPiServer.Core.ContentReference>.IsReadOnly
System.Collections.ObjectModel.Collection<EPiServer.Core.ContentReference>.System.Collections.ICollection.IsSynchronized
System.Collections.ObjectModel.Collection<EPiServer.Core.ContentReference>.System.Collections.ICollection.SyncRoot
System.Collections.ObjectModel.Collection<EPiServer.Core.ContentReference>.System.Collections.IList.Item[System.Int32]
System.Collections.ObjectModel.Collection<EPiServer.Core.ContentReference>.System.Collections.IList.IsReadOnly
System.Collections.ObjectModel.Collection<EPiServer.Core.ContentReference>.System.Collections.IList.IsFixedSize
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Core
Assembly: EPiServer.dll
Version: 11.20.7
Syntax
public class ContentPath : Collection<ContentReference>, IList<ContentReference>, ICollection<ContentReference>, IList, ICollection, IReadOnlyList<ContentReference>, IReadOnlyCollection<ContentReference>, IEnumerable<ContentReference>, IEnumerable

Constructors

ContentPath()

Initializes a new instance of the ContentPath class.

Declaration
public ContentPath()

ContentPath(IEnumerable<ContentReference>)

Initializes a new instance of the ContentPath class.

Declaration
public ContentPath(IEnumerable<ContentReference> contentLinks)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<ContentReference> contentLinks

The content links for all ancestor content to the actual content.

Methods

Parse(String)

Parses a dot seperated list of content links which represent the acestry of a content item.

Declaration
public static ContentPath Parse(string stringToParse)
Parameters
Type Name Description
System.String stringToParse

The string to parse

Returns
Type Description
ContentPath

A new instance of ContentPath.

StartsWith(ContentPath)

Checks if the current ContentPath starts with all the contentlinks in the given ContentPath.

Declaration
public bool StartsWith(ContentPath parentPath)
Parameters
Type Name Description
ContentPath parentPath

The parent path to compare with.

Returns
Type Description
System.Boolean

true if the current ContentPath starts with all the contentlinks in the given ContentPath; otherwise false.

ToString()

Generates a comma-separated list with content links

Declaration
public override string ToString()
Returns
Type Description
System.String
Overrides
System.Object.ToString()

Implements

System.Collections.Generic.IList<T>
System.Collections.Generic.ICollection<T>
System.Collections.IList
System.Collections.ICollection
System.Collections.Generic.IReadOnlyList<T>
System.Collections.Generic.IReadOnlyCollection<T>
System.Collections.Generic.IEnumerable<T>
System.Collections.IEnumerable

Extension Methods