Class Revision
One tracked change, as a handle a host can show in a review UI and then resolve.
A handle is a snapshot, in the same sense as DocumentRange: it captures where the revision was when GetRevisions(DomNode) ran. Resolving other revisions first can leave a handle describing content that is no longer in the document — accepting a deleted paragraph mark removes that paragraph — and Accept() and Reject() then report false rather than mutating something else.
public sealed class Revision
- Inheritance
-
Revision
- Inherited Members
Properties
- Author
Gets the author recorded on the revision, or null.
- Date
Gets the raw w:date value exactly as the document spelled it, or null.
- Id
Gets the revision id (w:id), or null. Word does not guarantee these are unique.
- IsStale
Gets a value indicating whether this revision's target is still attached to a document, so Accept() and Reject() would still apply.
- Preview
Gets a short plain-text preview of the affected content, truncated to 80 characters. Intended for review UIs; it is not a substitute for reading Target.
- Range
Gets the span of run content this revision covers, or null when it has none — a paragraph mark and a paragraph formatting change annotate the paragraph itself rather than a stretch of its content. Like every DocumentRange, it is a snapshot of positions taken when the revision was enumerated.
- Target
Gets the node the revision sits on: the Inline for content and run formatting, the Paragraph for a mark or paragraph formatting.
- Timestamp
Gets Date parsed as a point in time, or null when the document carried no date or spelled one this method cannot parse. Parsing is invariant-culture and round-trip; an unparseable date is never guessed at.
- Type
Gets what this revision describes.
Methods
- Accept()
Accepts the revision: an insertion loses its annotation and stays, a deletion's content is removed, and a formatting change keeps the current formatting.
- Reject()
Rejects the revision: an insertion's content is removed, a deletion loses its annotation and stays, and a formatting change restores the recorded previous formatting.