• DR-IT Software
  • Products
  • Documentation
  • Product page
  • Examples
  • API reference
  • Support
Show / Hide Table of Contents

Class Revision

Represents a tracked change revision on a document element (Run, Paragraph, TableRow). Each revision carries accept/reject delegates that perform the appropriate mutation on the owning element.

Inheritance
object
Revision
FormatRevision<TFormat>
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Namespace: DRIT.Document
Assembly: DRIT.Document.dll
Syntax
public class Revision

Constructors

Revision(RevisionType, string)

Creates a new revision with author and current date/time.

Declaration
public Revision(RevisionType revisionType, string author)
Parameters
Type Name Description
RevisionType revisionType

The type of revision.

string author

The author who made the revision.

Revision(RevisionType, string, DateTime)

Creates a new revision without accept/reject delegates. Useful when the user creates a revision programmatically — the delegates are wired later by the framework or left null (Accept/Reject become no-ops that only set the status flags).

Declaration
public Revision(RevisionType revisionType, string author, DateTime date)
Parameters
Type Name Description
RevisionType revisionType

The type of revision.

string author

The author who made the revision.

DateTime date

The date/time when the revision was made.

Revision(RevisionType, string, DateTime, Action, Action)

Creates a new revision.

Declaration
protected Revision(RevisionType revisionType, string author, DateTime date, Action acceptAction, Action rejectAction)
Parameters
Type Name Description
RevisionType revisionType

The type of revision (Insert, Delete, MoveFrom, MoveTo).

string author

The author who made the revision.

DateTime date

The date/time when the revision was made.

Action acceptAction

Delegate invoked by Accept().

Action rejectAction

Delegate invoked by Reject().

Properties

Author

The author who made the revision.

Declaration
public string Author { get; }
Property Value
Type Description
string

Date

The date/time when the revision was made.

Declaration
public DateTime Date { get; }
Property Value
Type Description
DateTime

IsAccepted

True after Accept() has been called.

Declaration
public bool IsAccepted { get; }
Property Value
Type Description
bool

IsRejected

True after Reject() has been called.

Declaration
public bool IsRejected { get; }
Property Value
Type Description
bool

IsResolved

True when this revision has been resolved (accepted or rejected).

Declaration
public bool IsResolved { get; }
Property Value
Type Description
bool

RevisionType

The type of revision (Insert, Delete, MoveFrom, MoveTo).

Declaration
public RevisionType RevisionType { get; }
Property Value
Type Description
RevisionType

Methods

Accept()

Accept this revision, permanently applying the change.

For Insert: the element stays (revision mark removed). For Delete: the element is removed from the document. For Format: the new format stays (revision mark removed).

Declaration
public void Accept()

Reject()

Reject this revision, undoing the change.

For Insert: the element is removed from the document. For Delete: the element stays (revision mark removed). For Format: the original format is restored (revision mark removed).

Declaration
public void Reject()
Back to top

DR-IT Software documentation

DR-IT Software · Products · Documentation index · Product page · Downloads · Support · Licensing

Generated by DocFX