Back to Devexpress

RevisionCollection Interface

officefileapi-devexpress-dot-xtrarichedit-dot-api-dot-native-379df02b.md

latest2.9 KB
Original Source

RevisionCollection Interface

A collection of Revision objects.

Namespace : DevExpress.XtraRichEdit.API.Native

Assembly : DevExpress.RichEdit.v25.2.Core.dll

NuGet Package : DevExpress.RichEdit.Core

Declaration

csharp
[ComVisible(true)]
public interface RevisionCollection :
    IEnumerable<Revision>,
    IEnumerable
vb
<ComVisible(True)>
Public Interface RevisionCollection
    Inherits IEnumerable(Of Revision),
             IEnumerable

The following members return RevisionCollection objects:

Remarks

Use the Document.Revisions property to access a RevisionCollection instance.

Note

The RevisionCollection is read-only - you cannot add or delete collection items.

The Revision object represents a revision. Use the object’s properties to obtain the revision’s date, author, and type. The Revision.Range property provides access to the document range to which the revision is applied.

You can accept or reject all revisions, or pass a specific Predicate<T> to the AcceptAll or RejectAll method to accept or reject revisions with given parameters.

The code sample below shows how to accept all revisions from a specific author made on the specified date:

csharp
using (RichEditDocumentServer wordProcessor = new RichEditDocumentServer())
{
    DateTime dateTime = new DateTime(2019,9,2);
    wordProcessor.Document.Revisions.AcceptAll(x=> x.Author == "Nancy Davolio" && x.DateTime == dateTime);
}
vb
Using wordProcessor As New RichEditDocumentServer()
    Dim dateTime As New Date(2019,9,2)
    wordProcessor.Document.Revisions.AcceptAll(Function(x) x.Author = "Nancy Davolio" AndAlso x.DateTime = dateTime)
End Using

See Also

RevisionCollection Members

DevExpress.XtraRichEdit.API.Native Namespace