Class NullContentVersionRepository
An implementation of IContentVersionRepository that does not support versions. This is the default implementation for VersionRepository.
Inheritance
Implements
Namespace: EPiServer.Core.Internal
Assembly: EPiServer.dll
Version: 12.0.3Syntax
public class NullContentVersionRepository : Object, 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(VersionFilter, Int32, Int32, out Int32)
Lists all versions that matches the filter
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 |
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 |
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 |
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 |
SetCommonDraft(ContentReference)
Sets the common draft.
Declaration
public virtual void SetCommonDraft(ContentReference contentLink)
Parameters
Type | Name | Description |
---|---|---|
ContentReference | contentLink | The content link. |