Class NullContentVersionRepository

An implementation of IContentVersionRepository that does not support versions. This is the default implementation for VersionRepository.

Inheritance
System.Object
NullContentVersionRepository
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.Core
Assembly: EPiServer.dll
Version: 8.11.0
Syntax
public class NullContentVersionRepository : IContentVersionRepository

Constructors

NullContentVersionRepository(ContentProvider)

Initializes a new instance of the NullContentVersionRepository class.

Declaration
public NullContentVersionRepository(ContentProvider provider)
Parameters
Type Name Description
ContentProvider provider

The provider.

Methods

Delete(ContentReference)

The implementation does not do anything since repository does not support versions

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

The content link.

List(ContentReference)

This implementation has no versioning support so it uses GetLanguageBranches(ContentReference) to get content. If versioning is to be supported this method should be overriden.

Declaration
public IEnumerable<ContentVersion> List(ContentReference contentLink)
Parameters
Type Name Description
ContentReference contentLink

The content link.

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

All matching versions

List(ContentReference, String)

This implementation has no versioning support so it uses Load(ContentReference, ILanguageSelector) to get content. If versioning is to be supported this method should be overriden.

Declaration
public IEnumerable<ContentVersion> List(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.IEnumerable<ContentVersion>

All matching versions

ListDelayedPublish()

The implementation does not do anything since the default implementation is in DefaultContentversionRepository

Declaration
public virtual IEnumerable<ContentReference> ListDelayedPublish()
Returns
Type Description
System.Collections.Generic.IEnumerable<ContentReference>

ListPublished(ContentReference)

This implementation has no versioning support so it uses GetLanguageBranches(ContentReference) to get content. If versioning is to be supported this method should be overriden.

Declaration
public IEnumerable<ContentVersion> ListPublished(ContentReference contentLink)
Parameters
Type Name Description
ContentReference contentLink

The content link.

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

All published versions for the content

Load(ContentReference)

This implementation has no versioning support so it uses Load(ContentReference, ILanguageSelector) to get content. If versioning is to be supported this method should be overriden.

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

The content link.

Returns
Type Description
ContentVersion

A PageVersion

LoadCommonDraft(ContentReference, String)

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)

This implementation has no versioning support so it uses Load(ContentReference, ILanguageSelector) to get content. If versioning is to be supported this method should be overriden.

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

The content link.

Returns
Type Description
ContentVersion

A PageVersion

LoadPublished(ContentReference, String)

This implementation has no versioning support so it uses Load(ContentReference, ILanguageSelector) to get content. If versioning is to be supported this method should be overriden.

Declaration
public 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 PageVersion

SetCommonDraft(ContentReference)

Sets the common draft.

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

The content link.

Implements

Extension Methods