Class ContentStore

Abstractions for loading data directly from the database bypassing the provider system, supports the ClonedContentProvider shipped with CMS 7-9

Inheritance
System.Object
ContentStore
Inherited Members
System.Object.ToString()
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.DataAbstraction
Assembly: EPiServer.Cms.AspNet.dll
Version: 11.20.7
Syntax
[ServiceConfiguration]
public class ContentStore

Constructors

ContentStore()

Initializes a new instance of the DefaultContentProviderDatabase class.

Declaration
public ContentStore()

ContentStore(ServiceAccessor<ContentListDB>, ServiceAccessor<ContentLoadDB>)

Declaration
public ContentStore(ServiceAccessor<ContentListDB> contentListDBAccessor, ServiceAccessor<ContentLoadDB> contentLoadDBAccessor)
Parameters
Type Name Description
ServiceAccessor<ContentListDB> contentListDBAccessor
ServiceAccessor<ContentLoadDB> contentLoadDBAccessor

Methods

CountDescendants(ContentReference)

Counts the descendants.

Declaration
public virtual int CountDescendants(ContentReference contentLink)
Parameters
Type Name Description
ContentReference contentLink

The content link.

Returns
Type Description
System.Int32

IsContentTypeUsed(ContentType, Boolean)

Checks if a content type is used.

Declaration
public virtual bool IsContentTypeUsed(ContentType contentType, bool onlyPublished)
Parameters
Type Name Description
ContentType contentType

Type of the content.

System.Boolean onlyPublished

if set to true only published content is checked.

Returns
Type Description
System.Boolean

ListAll()

Lists all.

Declaration
public virtual IList<ContentReference> ListAll()
Returns
Type Description
System.Collections.Generic.IList<ContentReference>

ListAll(ContentReference)

Lists all.

Declaration
public virtual IList<ContentReference> ListAll(ContentReference contentLink)
Parameters
Type Name Description
ContentReference contentLink

The content link.

Returns
Type Description
System.Collections.Generic.IList<ContentReference>

ListAll(ContentReference, String)

Lists all.

Declaration
public virtual IList<ContentReference> ListAll(ContentReference contentLink, string languageBranch)
Parameters
Type Name Description
ContentReference contentLink

The content link.

System.String languageBranch

The language branch.

Returns
Type Description
System.Collections.Generic.IList<ContentReference>

ListContentOfContentType(ContentType, Boolean)

Lists the contents of the content type.

Declaration
public virtual IList<ContentUsage> ListContentOfContentType(ContentType contentType, bool onlyPublished)
Parameters
Type Name Description
ContentType contentType

Type of the content.

System.Boolean onlyPublished

if set to true [only published].

Returns
Type Description
System.Collections.Generic.IList<ContentUsage>

ListMatchingSegments(ContentReference, String)

Lists references to all children content items that have matching routing/url segments.

Declaration
public virtual IList<MatchingSegmentResult> ListMatchingSegments(ContentReference parentLink, string urlSegment)
Parameters
Type Name Description
ContentReference parentLink

The parent link.

System.String urlSegment

The URL segment.

Returns
Type Description
System.Collections.Generic.IList<MatchingSegmentResult>

Load(ContentReference, Int32)

Loads the content.

Declaration
public virtual IContent Load(ContentReference contentLink, int languageBranchID)
Parameters
Type Name Description
ContentReference contentLink

The content link.

System.Int32 languageBranchID

The language branch ID.

Returns
Type Description
IContent

LoadChildrenReferencesAndTypes(Int32, String, out FilterSortOrder)

load content references and content types

Declaration
public virtual IList<GetChildrenReferenceResult> LoadChildrenReferencesAndTypes(int contentID, string languageID, out FilterSortOrder parentSortOrder)
Parameters
Type Name Description
System.Int32 contentID
System.String languageID
FilterSortOrder parentSortOrder
Returns
Type Description
System.Collections.Generic.IList<GetChildrenReferenceResult>

LoadSpecificContentInstances(IList<ContentReference>, Int32)

Loads the specific content instances.

Declaration
public virtual IList<IContent> LoadSpecificContentInstances(IList<ContentReference> contentLinks, int languageBranchID)
Parameters
Type Name Description
System.Collections.Generic.IList<ContentReference> contentLinks

The content links.

System.Int32 languageBranchID

The language branch ID.

Returns
Type Description
System.Collections.Generic.IList<IContent>

LoadSpecificContentVersions(IList<ContentReference>)

Batch loads specific versions of content.

Declaration
public virtual IList<IContent> LoadSpecificContentVersions(IList<ContentReference> contentLinks)
Parameters
Type Name Description
System.Collections.Generic.IList<ContentReference> contentLinks

The versions to load.

Returns
Type Description
System.Collections.Generic.IList<IContent>
Remarks

WorkID must be set on all versions otherwise System.ArgumentException is thrown.

LoadVersion(ContentReference)

Loads the version.

Declaration
public virtual IContent LoadVersion(ContentReference contentLink)
Parameters
Type Name Description
ContentReference contentLink

The content link.

Returns
Type Description
IContent

LoadVersion(ContentReference, Int32)

Loads the version.

Declaration
public virtual IContent LoadVersion(ContentReference contentLink, int languageBranchID)
Parameters
Type Name Description
ContentReference contentLink

The content link.

System.Int32 languageBranchID

The language branch ID.

Returns
Type Description
IContent

Extension Methods