DeleteAnnotationRedaction Class
Represents a text redaction that deletes annotations if text is matching given regular expression (optionally deletes all annotations).
Inheritance Hierarchy
SystemObject
  GroupDocs.RedactionRedaction
    GroupDocs.Redaction.RedactionsDeleteAnnotationRedaction

Namespace: GroupDocs.Redaction.Redactions
Assembly: GroupDocs.Redaction (in GroupDocs.Redaction.dll) Version: 19.9
Syntax
public class DeleteAnnotationRedaction : Redaction

The DeleteAnnotationRedaction type exposes the following members.

Constructors
  NameDescription
Public methodDeleteAnnotationRedaction
Initializes a new instance of DeleteAnnotationRedaction class, with settings to delete all annotations (matching everything).
Public methodDeleteAnnotationRedaction(String)
Initializes a new instance of DeleteAnnotationRedaction class, deleting annotations matching given expression.
Public methodDeleteAnnotationRedaction(Regex)
Initializes a new instance of DeleteAnnotationRedaction class, deleting annotations matching given expression.
Properties
  NameDescription
Public propertyExpression
Gets the regular expression to match.
Methods
  NameDescription
Public methodApplyTo
Applies the redaction to a given format instance.
(Overrides RedactionApplyTo(DocumentFormatInstance).)
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from 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.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Examples
The following example demonstrates how to remove all annotations containing words "use", "show" or "describe" from document (and leave others).
C#
using (Redactor redactor = new Redactor(@"D:\test.docx"))
{
   redactor.Apply(new DeleteAnnotationRedaction("(?im:(use|show|describe))"));
   redactor.Save()
}
See Also