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: 20.11
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 propertyDescription
Returns a string, describing the redaction and its parameters.
(Overrides RedactionDescription.)
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 (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Protected methodMemberwiseClone (Inherited from Object.)
Public methodToString (Inherited from Object.)
Remarks
Learn more
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