New to Telerik UI for WinForms? Start a free 30-day trial

Stores the author and timestamp associated with a document revision. Revision equality and merging use Author and Date; they do not include Tag.

Definition

Namespace:Telerik.WinForms.Documents.Model.Revisions

Assembly:Telerik.WinControls.RichTextEditor.dll

Syntax:

C#
public class RevisionInfo

Inheritance: objectRevisionInfo

Constructors

Creates revision metadata with the author set to Anonymous and the date set to the current time, rounded down to the minute in non-debug builds and to 10-second intervals in DEBUG builds.

C#
public RevisionInfo()

Properties

Gets or sets the author name recorded for the revision.

C#
[XamlSerializable]
public string Author { get; set; }

Gets or sets the date and time recorded for the revision.

C#
[TypeConverter(typeof(UniversalDateTimeConverter))]
[XamlSerializable]
public DateTime Date { get; set; }

Gets or sets an additional serialized tag. This value is not considered by revision equality or merging, and is not copied by CreateDeepCopy().

C#
[XamlSerializable]
public string Tag { get; set; }

Methods

Creates a copy of the author and date metadata. The Tag is not copied.

C#
public RevisionInfo CreateDeepCopy()
Returns:

RevisionInfo

A new revision metadata instance with the same author and date.

Determines whether the specified object has the same author and date as this revision. The tag is ignored.

C#
public override bool Equals(object obj)
Parameters:objobject

The object to compare with this revision.

Returns:

bool

true if obj is a RevisionInfo with matching author and date; otherwise, false.

Overrides: object.Equals(object)

Returns a hash code based on the author and date, matching the fields used by Equals(object).

C#
public override int GetHashCode()
Returns:

int

A hash code for this revision.

Overrides: object.GetHashCode()

Author must not be null because this implementation dereferences it.

Determines whether two revisions can be merged by comparing their author and date. The tag is ignored.

C#
public static bool ShouldMerge(RevisionInfo info1, RevisionInfo info2)
Parameters:info1RevisionInfo

The first revision, or null.

info2RevisionInfo

The second revision, or null.

Returns:

bool

true when the revisions compare equal; otherwise, false.

Operators

Determines whether two revisions have different authors or dates, or only one reference is null. The tag is ignored.

C#
public static bool operator !=(RevisionInfo left, RevisionInfo right)
Parameters:leftRevisionInfo

The first revision, or null.

rightRevisionInfo

The second revision, or null.

Returns:

bool

true if the revisions are not equal; otherwise, false.

Determines whether two revisions have the same author and date. The tag is ignored.

C#
public static bool operator ==(RevisionInfo left, RevisionInfo right)
Parameters:leftRevisionInfo

The first revision, or null.

rightRevisionInfo

The second revision, or null.

Returns:

bool

true if both references are null or their author and date match; otherwise, false.