Back to Devexpress

RevisionCollection.AcceptAll(Predicate<Revision>) Method

officefileapi-devexpress-dot-xtrarichedit-dot-api-dot-native-dot-revisioncollection-dot-acceptall-x28-system-dot-predicate-devexpress-dot-xtrarichedit-dot-api-dot-native-dot-revision-x29.md

latest5.8 KB
Original Source

RevisionCollection.AcceptAll(Predicate<Revision>) Method

Accepts all revisions that meet the specified criteria.

Namespace : DevExpress.XtraRichEdit.API.Native

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

NuGet Package : DevExpress.RichEdit.Core

Declaration

csharp
void AcceptAll(
    Predicate<Revision> predicate
)
vb
Sub AcceptAll(
    predicate As Predicate(Of Revision)
)

Parameters

NameTypeDescription
predicatePredicate<Revision>

A Predicate<T> object that defines a set of criteria for the Revision object.

|

Remarks

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

The following code snippets (auto-collected from DevExpress Examples) contain references to the AcceptAll(Predicate<Revision>) method.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

word-document-api-use-track-changes/CS/word-processing-document-api-track-changes/Program.cs#L48

csharp
//Accept all format changes:
documentRevisions.AcceptAll(x => x.Type == RevisionType.CharacterPropertyChanged || x.Type == RevisionType.ParagraphPropertyChanged || x.Type == RevisionType.SectionPropertyChanged);

winforms-rich-edit-manage-tracked-changes/CS/XtraRichEdit_TrackChanges/Form1.cs#L59

csharp
//Accept all format changes:
documentRevisions.AcceptAll(x => x.Type == RevisionType.CharacterPropertyChanged || x.Type == RevisionType.ParagraphPropertyChanged || x.Type == RevisionType.SectionPropertyChanged);

wpf-richedit-manage-tracked-changes/CS/DXRichEdit_TrackChanges/MainWindow.xaml.cs#L42

csharp
//Accept all format changes:
    documentRevisions.AcceptAll(x => x.Type == RevisionType.CharacterPropertyChanged || x.Type == RevisionType.ParagraphPropertyChanged || x.Type == RevisionType.SectionPropertyChanged);
}

word-document-api-use-track-changes/VB/word-processing-document-api-track-changes/Program.vb#L46

vb
'Accept all format changes:
documentRevisions.AcceptAll(Function(x) x.Type = RevisionType.CharacterPropertyChanged OrElse x.Type = RevisionType.ParagraphPropertyChanged OrElse x.Type = RevisionType.SectionPropertyChanged)

winforms-rich-edit-manage-tracked-changes/VB/XtraRichEdit_TrackChanges/Form1.vb#L50

vb
'Accept all format changes:
    documentRevisions.AcceptAll(Function(x) x.Type = RevisionType.CharacterPropertyChanged OrElse x.Type = RevisionType.ParagraphPropertyChanged OrElse x.Type = RevisionType.SectionPropertyChanged)
End Sub

wpf-richedit-manage-tracked-changes/VB/DXRichEdit_TrackChanges/MainWindow.xaml.vb#L35

vb
'Accept all format changes:
    documentRevisions.AcceptAll(Function(x) x.Type = RevisionType.CharacterPropertyChanged OrElse x.Type = RevisionType.ParagraphPropertyChanged OrElse x.Type = RevisionType.SectionPropertyChanged)
End Sub

See Also

RevisionCollection Interface

RevisionCollection Members

DevExpress.XtraRichEdit.API.Native Namespace