Class ChangeTracking

Default implementation of IChangeTrackable.

Inheritance
System.Object
ChangeTracking
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 ChangeTracking : IChangeTrackable, IReadOnly<ChangeTracking>, IReadOnly, IModifiedTrackable

Constructors

ChangeTracking()

Declaration
public ChangeTracking()

Properties

Changed

Gets the date when this content instance was last marked as changed.

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

The changed date is only updated when property SetChangedOnPublish is set to true.

ChangedBy

Gets the username of the user that most recently changed this content instance.

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

For instance, if a Windows account was used to create the instance, expect a string being returned looking like 'DOMAIN\User Name'.

Created

Gets the date and time when this content instance was created.

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

Created is maintained by the EPiServer infrastructure and you have no control over them.

CreatedBy

Gets the username of the user that created this content instance.

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

Deleted

Gets a value indicating when this instance is deleted.

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

The deleted date.

DeletedBy

Gets a value indicating who deleted this instance.

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

The deleted by.

IsModified

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

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

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

IsReadOnly

Gets a value indicating whether this instance is read only.

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

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

Saved

Gets the date and time when this content instance was last saved.

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

Saved is the sibling of Created and is maintained by the EPiServer infrastructure. This means that you have no control over them.

SetChangedOnPublish

Gets or sets a value indicating whether the Changed should be updated on publish.

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

true if Changed should be updated; otherwise, false.

Methods

CreateWritableClone()

Creates the writable clone.

Declaration
public ChangeTracking CreateWritableClone()
Returns
Type Description
ChangeTracking

MakeReadOnly()

Makes the read only.

Declaration
public void MakeReadOnly()

ResetModified()

Resets the modified flag on all the data contained on the instance.

Declaration
public void ResetModified()

ThrowIfReadOnly()

Utility method that, when called, throws a System.NotSupportedException indicating that the ContentID has been set as read-only.

Declaration
protected void ThrowIfReadOnly()
Remarks

This method is used internally by other ContentID methods to standardize the exception thrown when trying to modify a ContentID set as read-only.

Explicit Interface Implementations

IReadOnly.CreateWritableClone()

Creates the writable clone.

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

Implements

Extension Methods