RevisionGroupCollection Class |
Namespace: Aspose.Words
The RevisionGroupCollection type exposes the following members.
| Name | Description | |
|---|---|---|
| Count |
Returns the number of revision groups in the collection.
| |
| Item |
Returns a revision group at the specified index.
|
| Name | Description | |
|---|---|---|
| Equals | (Inherited from Object.) | |
| GetEnumerator |
Returns an enumerator object.
| |
| GetHashCode | (Inherited from Object.) | |
| GetType | (Inherited from Object.) | |
| ToString | (Inherited from Object.) |
You do not create instances of this class directly. Use the Groups property to get revision groups present in a document.
Document doc = new Document(MyDir + "Revisions.docx"); Console.WriteLine("Revision groups count: {0}\n", doc.Revisions.Groups.Count); // Get info about all of revisions in document foreach (RevisionGroup group in doc.Revisions.Groups) { Console.WriteLine("Revision author: {0}; Revision type: {1} \nRevision text: {2}", group.Author, group.RevisionType, group.RevisionType); }
Document doc = new Document(MyDir + "Revisions.docx"); // Get revision group by index RevisionGroup revisionGroup = doc.Revisions.Groups[1]; // Get info about specific revision groups sorted by RevisionType IEnumerable<string> revisionGroupCollectionInsertionType = doc.Revisions.Groups.Where(p => p.RevisionType == RevisionType.Insertion).Select(p => $"Revision type: {p.RevisionType.ToString()},\nRevision author: {p.Author},\nRevision text: {p.Text}.\n"); foreach (string revisionGroupInfo in revisionGroupCollectionInsertionType) { Console.WriteLine(revisionGroupInfo); }