Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

Class DefaultContentVersionRepository

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice.

Inheritance
System.Object
DefaultContentVersionRepository
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.Internal
Assembly: EPiServer.dll
Version: 11.20.7
Syntax
[ServiceConfiguration(Lifecycle = ServiceInstanceScope.Singleton)]
public class DefaultContentVersionRepository : IContentVersionRepository, IContentVersionRepositoryEx

Constructors

DefaultContentVersionRepository(ServiceAccessor<ContentVersionDB>, ISynchronizedObjectInstanceCache, IContentCacheKeyCreator, ContentOptions)

Declaration
public DefaultContentVersionRepository(ServiceAccessor<ContentVersionDB> versionDD, ISynchronizedObjectInstanceCache cache, IContentCacheKeyCreator cacheKeyCreator, ContentOptions contentOptions)
Parameters
Type Name Description
ServiceAccessor<ContentVersionDB> versionDD
ISynchronizedObjectInstanceCache cache
IContentCacheKeyCreator cacheKeyCreator
ContentOptions contentOptions

Fields

CachedContentVersionKey

Declaration
public const string CachedContentVersionKey = "EP:ContentVersion:"
Field Value
Type Description
System.String

Methods

ClearCache(ContentReference)

Declaration
public void ClearCache(ContentReference contentLink)
Parameters
Type Name Description
ContentReference contentLink

Delete(ContentReference)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Delete a single version of a Content

Declaration
public virtual void Delete(ContentReference contentLink)
Parameters
Type Name Description
ContentReference contentLink

The content link.

DeleteVersionByDataAccess(ContentReference)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Deletes the version from Respository.

Declaration
protected virtual void DeleteVersionByDataAccess(ContentReference contentLink)
Parameters
Type Name Description
ContentReference contentLink

The content link.

Initialize(IContentEvents)

Declaration
public void Initialize(IContentEvents contentEvents)
Parameters
Type Name Description
IContentEvents contentEvents

List(VersionFilter, Int32, Int32, out Int32)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice.

Declaration
public IEnumerable<ContentVersion> List(VersionFilter filter, int startIndex, int maxRows, out int totalCount)
Parameters
Type Name Description
VersionFilter filter

The filter used

System.Int32 startIndex

The start index, used for paging

System.Int32 maxRows

The maximum number of rows returned

System.Int32 totalCount

The total amount of matched versions

Returns
Type Description
System.Collections.Generic.IEnumerable<ContentVersion>

A list of versions, if no versions where matched an empty list will be returned

ListObsolete(Int32, out Int32)

Declaration
public IEnumerable<ContentVersion> ListObsolete(int maxRows, out int totalCount)
Parameters
Type Name Description
System.Int32 maxRows
System.Int32 totalCount
Returns
Type Description
System.Collections.Generic.IEnumerable<ContentVersion>

Load(ContentReference)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Loads the version.

Declaration
public virtual ContentVersion Load(ContentReference contentLink)
Parameters
Type Name Description
ContentReference contentLink

The content link.

Returns
Type Description
ContentVersion

A ContentVersion

LoadCommonDraft(ContentReference, String)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Loads the common draft.

Declaration
public virtual ContentVersion LoadCommonDraft(ContentReference contentLink, string language)
Parameters
Type Name Description
ContentReference contentLink

The content link to load common draft for.

System.String language

The language.

Returns
Type Description
ContentVersion

CommonDraft if it exist, otherwise Published, If no published exist the latest saved version is returned

LoadPublished(ContentReference)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Loads the published version

Declaration
public virtual ContentVersion LoadPublished(ContentReference contentLink)
Parameters
Type Name Description
ContentReference contentLink

The content link.

Returns
Type Description
ContentVersion

A ContentVersion

LoadPublished(ContentReference, String)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Loads the published version a page with current language selection if the languageBranch is null otherwise loads the published version a page for a specific language

Declaration
public virtual ContentVersion LoadPublished(ContentReference contentLink, string languageBranch)
Parameters
Type Name Description
ContentReference contentLink

The content link.

System.String languageBranch

The language branch.

Returns
Type Description
ContentVersion

A ContentVersion

SetCommonDraft(ContentReference)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Sets the specified version as common draft.

Declaration
public void SetCommonDraft(ContentReference contentLink)
Parameters
Type Name Description
ContentReference contentLink

The content link.

Implements

Extension Methods