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

Class ContentVersion

A specific version of a ContentData object.

Inheritance
System.Object
ContentVersion
Implements
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.DataAbstraction
Assembly: EPiServer.dll
Version: 10.10.4
Syntax
public class ContentVersion : IReadOnly

Constructors

ContentVersion(ContentReference, String, VersionStatus, DateTime, String, String, Int32, String, Boolean, Boolean)

Initializes a new instance of the ContentVersion class.

Declaration
public ContentVersion(ContentReference contentLink, string name, VersionStatus workStatus, DateTime saved, string savedBy, string statusChangedBy, int masterVersionID, string languageBranch, bool isMasterLanguageBranch, bool isCommonDraft)
Parameters
Type Name Description
ContentReference contentLink

The content link.

System.String name

The name.

VersionStatus workStatus

The work status.

System.DateTime saved

The saved.

System.String savedBy

The saved by.

System.String statusChangedBy

The status changed by.

System.Int32 masterVersionID

The master version ID.

System.String languageBranch

The language branch.

System.Boolean isMasterLanguageBranch

Set to true if this version is for the master language branch.

System.Boolean isCommonDraft

Set to true if this version is the common draft for the content.

Properties

Gets or sets the the link to the content this version belongs to.

Declaration
public ContentReference ContentLink { get; set; }
Property Value
Type Description
ContentReference

The ID.

DelayPublishUntil

Gets or sets the date when this version should be published when set as delay published.

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

IsCommonDraft

Gets or sets a value indicating whether this instance is common draft.

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

true if this instance is common draft; otherwise, false.

IsMasterLanguageBranch

Gets or sets a value indicating whether this content version is the master language branch.

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

true if this instance is master language branch; otherwise, false.

IsReadOnly

Gets a value indicating whether this instance is read only.

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

LanguageBranch

Gets or sets the language branch for the content version

Declaration
public string LanguageBranch { get; set; }
Property Value
Type Description
System.String

The language branch.

MasterVersionID

Gets or sets the master version ID.

Declaration
public int MasterVersionID { get; set; }
Property Value
Type Description
System.Int32

The master version ID.

Name

Gets or sets the name for the content version

Declaration
public string Name { get; set; }
Property Value
Type Description
System.String

The name.

Saved

Gets or sets the saved time for the content version

Declaration
public DateTime Saved { get; set; }
Property Value
Type Description
System.DateTime

The saved.

SavedBy

Gets or sets the person who saved the content version

Declaration
public string SavedBy { get; set; }
Property Value
Type Description
System.String

The saved by.

Status

Gets or sets the status for the content version

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

The status.

StatusChangedBy

Gets or sets the person who changed the content version

Declaration
public string StatusChangedBy { get; set; }
Property Value
Type Description
System.String

The status changed by.

Methods

CreateWritableClone()

Creates the a writable clone of this object.

Declaration
public ContentVersion CreateWritableClone()
Returns
Type Description
ContentVersion

A writable clone of this object

Equals(Object)

Determines whether the specified System.Object is equal to the current System.Object.

Declaration
public override bool Equals(object obj)
Parameters
Type Name Description
System.Object obj

The System.Object to compare with the current System.Object.

Returns
Type Description
System.Boolean

true if the specified System.Object is equal to the current System.Object; otherwise, false.

Overrides
System.Object.Equals(System.Object)

GetHashCode()

Serves as a hash function for a particular type.

Declaration
public override int GetHashCode()
Returns
Type Description
System.Int32

A hash code for the current System.Object.

Overrides
System.Object.GetHashCode()

MakeReadOnly()

Makes this instance read only.

Declaration
public void MakeReadOnly()

Operators

Equality(ContentVersion, ContentVersion)

Implements the operator ==.

Declaration
public static bool operator ==(ContentVersion x, ContentVersion y)
Parameters
Type Name Description
ContentVersion x

The x.

ContentVersion y

The y.

Returns
Type Description
System.Boolean

true if content versions are equal; otherwise false

Inequality(ContentVersion, ContentVersion)

Implements the operator !=.

Declaration
public static bool operator !=(ContentVersion x, ContentVersion y)
Parameters
Type Name Description
ContentVersion x

The x.

ContentVersion y

The y.

Returns
Type Description
System.Boolean

true if content versions are not equal; otherwise false

Explicit Interface Implementations

IReadOnly.CreateWritableClone()

Creates the a writable clone of this object.

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

A writable clone of this object

Implements

Extension Methods