Class ContentPath
A collection of ContentReferences to represents the content item and it's ancestors.
Inheritance
System.Object
ContentPath
Namespace: EPiServer.Core
Assembly: EPiServer.dll
Version: 12.0.3Syntax
public class ContentPath : Collection<ContentReference>
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 |
|
ToString()
Generates a comma-separated list with content links
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String |