RevisionGroupCollection Class
A collection of RevisionGroup objects that represent revision groups in the document.
Inheritance Hierarchy
SystemObject
  Aspose.WordsRevisionGroupCollection

Namespace: Aspose.Words
Assembly: Aspose.Words (in Aspose.Words.dll) Version: 19.9
Syntax
public sealed class RevisionGroupCollection : IEnumerable<RevisionGroup>, 
	IEnumerable

The RevisionGroupCollection type exposes the following members.

Properties
  NameDescription
Public propertyCode exampleCount
Returns the number of revision groups in the collection.
Public propertyCode exampleItem
Returns a revision group at the specified index.
Methods
  NameDescription
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodCode exampleGetEnumerator
Returns an enumerator object.
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the type of the current instance.
(Inherited from Object.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Remarks

You do not create instances of this class directly. Use the Groups property to get revision groups present in a document.

Examples
Shows how to get info about a set of revisions in document.
[C#]

Document doc = new Document(MyDir + "Document.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);
}
Examples
Shows how to get a set of revisions in document.
[C#]

Document doc = new Document(MyDir + "Document.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 =>
        string.Format("Revision type: {0},\nRevision author: {1},\nRevision text: {2}.\n",
            p.RevisionType.ToString(), p.Author, p.Text));

foreach (string revisionGroupInfo in revisionGroupCollectionInsertionType)
{
    Console.WriteLine(revisionGroupInfo);
}
See Also