Class ContentVersion
A specific version of a Content
Inheritance
Implements
Namespace: EPiServer.DataAbstraction
Assembly: EPiServer.dll
Version: 12.0.3Syntax
public class ContentVersion : Object, IReadOnly
Constructors
ContentVersion(ContentReference, String, VersionStatus, DateTime, String, String, Int32, String, Boolean, Boolean)
Initializes a new instance of the Content
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 |
---|---|---|
Content |
contentLink | The content link. |
System. |
name | The name. |
Version |
workStatus | The work status. |
System. |
saved | The saved. |
System. |
savedBy | The saved by. |
System. |
statusChangedBy | The status changed by. |
System. |
masterVersionID | The master version ID. |
System. |
languageBranch | The language branch. |
System. |
isMasterLanguageBranch | Set to |
System. |
isCommonDraft | Set to |
Properties
ContentLink
Gets or sets the the link to the content this version belongs to.
Declaration
public ContentReference ContentLink { get; set; }
Property Value
Type | Description |
---|---|
Content |
The ID. |
DelayPublishUntil
Gets or sets the date when this version should be published when set as delay published.
Declaration
public virtual Nullable<DateTime> DelayPublishUntil { get; set; }
Property Value
Type | Description |
---|---|
System. |
IsCommonDraft
Gets or sets a value indicating whether this instance is common draft.
Declaration
public bool IsCommonDraft { get; set; }
Property Value
Type | Description |
---|---|
System. |
|
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. |
|
IsReadOnly
Gets a value indicating whether this instance is read only.
Declaration
public bool IsReadOnly { get; }
Property Value
Type | Description |
---|---|
System. |
LanguageBranch
Gets or sets the language branch for the content version
Declaration
public string LanguageBranch { get; set; }
Property Value
Type | Description |
---|---|
System. |
The language branch. |
MasterVersionID
Gets or sets the master version ID.
Declaration
public int MasterVersionID { get; set; }
Property Value
Type | Description |
---|---|
System. |
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. |
The name. |
Saved
Gets or sets the saved time for the content version
Declaration
public DateTime Saved { get; set; }
Property Value
Type | Description |
---|---|
System. |
The saved. |
SavedBy
Gets or sets the person who saved the content version
Declaration
public string SavedBy { get; set; }
Property Value
Type | Description |
---|---|
System. |
The saved by. |
Status
Gets or sets the status for the content version
Declaration
public VersionStatus Status { get; set; }
Property Value
Type | Description |
---|---|
Version |
The status. |
StatusChangedBy
Gets or sets the person who changed the content version
Declaration
public string StatusChangedBy { get; set; }
Property Value
Type | Description |
---|---|
System. |
The status changed by. |
Methods
CreateWritableClone()
Creates the a writable clone of this object.
Declaration
public ContentVersion CreateWritableClone()
Returns
Type | Description |
---|---|
Content |
A writable clone of this object |
Equals(Object)
Determines whether the specified System.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
System. |
obj | The System. |
Returns
Type | Description |
---|---|
System. |
true if the specified System. |
GetHashCode()
Serves as a hash function for a particular type.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System. |
A hash code for the current System. |
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 |
---|---|---|
Content |
x | The x. |
Content |
y | The y. |
Returns
Type | Description |
---|---|
System. |
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 |
---|---|---|
Content |
x | The x. |
Content |
y | The y. |
Returns
Type | Description |
---|---|
System. |
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. |
A writable clone of this object |