November Happy Hour will be moved to Thursday December 5th.

Class ContentBase

Class that can be used as base class for IContent implementations. See also StandardContentBase, which in most cases is the base class that content types should inherit from.

Inheritance
System.Object
ContentBase
Namespace: EPiServer.Core
Assembly: EPiServer.dll
Version: 10.10.4
Syntax
public abstract class ContentBase : BasicContent, IInitializableContent, IContent, IContentData, IChangeTrackable, IExportable, IVersionable, IReadOnly, IModifiedTrackable, IContentSecurable, ISecurable, ICategorizable
Remarks

IRoutable should be implemented to support direct routing to instances.

Constructors

ContentBase()

Declaration
protected ContentBase()

Properties

Category

Gets a CategoryList containing the categories that the instance belongs to.

Declaration
public CategoryList Category { get; set; }
Property Value
Type Description
CategoryList

IsModified

Gets a value indicating whether this instance has been modified after loading.

Declaration
protected override bool IsModified { get; }
Property Value
Type Description
System.Boolean

true if this instance has been modified; otherwise, false.

Overrides

IsPendingPublish

Gets or sets a value indicating whether this instance is in pending publish state.

Declaration
public bool IsPendingPublish { get; set; }
Property Value
Type Description
System.Boolean

true if this instance is in pending publish state; otherwise, false.

StartPublish

Gets or sets the start publish.

Declaration
public DateTime? StartPublish { get; set; }
Property Value
Type Description
System.Nullable<System.DateTime>

The start publish.

Status

Gets or sets the status of the instance.

Declaration
public VersionStatus Status { get; set; }
Property Value
Type Description
VersionStatus

The status.

StopPublish

Gets or sets the stop publish.

Declaration
public DateTime? StopPublish { get; set; }
Property Value
Type Description
System.Nullable<System.DateTime>

The stop publish.

Methods

CreateWriteableCloneImplementation()

Creates a writable clone of this object.

Declaration
protected override object CreateWriteableCloneImplementation()
Returns
Type Description
System.Object

A clone of this object that is writable.

Overrides
Remarks

This method is called by CreateWritableClone(). If you are inheriting, directly or indirectly, from ContentData you should override this method to make sure that all reference type members of your class are cloned.

Your override of this method must create the clone by calling base.CreateWritableCloneImplementation(). This ensures that all classes in the inheritance chain can create clones as necessary. Also, by calling the base implementation the values of all value type members are copied as the ContentData implementation of this method calls System.Object.MemberwiseClone().

MakeReadOnly()

Makes the current instance and all it's properties read-only.

Declaration
public override void MakeReadOnly()
Overrides
Remarks

After calling this method the IsReadOnly property will return true.

ResetModified()

Resets the modified flag on all the properties in the Property collection.

Declaration
protected override void ResetModified()
Overrides

Explicit Interface Implementations

IModifiedTrackable.IsModified

Gets a value indicating whether this instance has been modified after loading.

Declaration
bool IModifiedTrackable.IsModified { get; }
Returns
Type Description
System.Boolean

true if this instance has been modified; otherwise, false.

IModifiedTrackable.ResetModified()

Resets the modified flag on all the properties in the Property collection.

Declaration
void IModifiedTrackable.ResetModified()

IReadOnly.CreateWritableClone()

Creates a writable clone.

Declaration
object IReadOnly.CreateWritableClone()
Returns
Type Description
System.Object

IReadOnly.IsReadOnly

Gets a value indicating whether this instance is read only.

Declaration
bool IReadOnly.IsReadOnly { get; }
Returns
Type Description
System.Boolean

true if this instance is read only; otherwise, false.

IReadOnly.MakeReadOnly()

Makes the instance read only.

Declaration
void IReadOnly.MakeReadOnly()

IContentSecurable.GetContentSecurityDescriptor()

Declaration
IContentSecurityDescriptor IContentSecurable.GetContentSecurityDescriptor()
Returns
Type Description
IContentSecurityDescriptor

ISecurable.GetSecurityDescriptor()

Declaration
ISecurityDescriptor ISecurable.GetSecurityDescriptor()
Returns
Type Description
ISecurityDescriptor

Implements

Extension Methods