IRedactionCallback Interface |
Namespace: GroupDocs.Redaction.Redactions
The IRedactionCallback type exposes the following members.
Name | Description | |
---|---|---|
![]() | AcceptRedaction |
This call is triggered right before applying any redaction to the document and allows to log or forbid it.
|
public class RedactionDump : IRedactionCallback { public RedactionDump() { } public bool AcceptRedaction(RedactionDescription description) { Console.Write("{0} redaction, {1} action, item {2}. ", description.RedactionType, description.ActionType, description.OriginalText); if (description.Replacement != null) { Console.Write("Text {0} is replaced with {1}. ", description.Replacement.OriginalText, description.Replacement.Replacement); } Console.WriteLine(); // you can return "false" here to prevent particular change during redaction process return true; } } ... // Assign an instance before using Redactor Redactor.RedactionCallback = new RedactionDump();