Rtf To Text Attachment Placeholder Callback Delegate
Definition
Assembly: MimeKit.Core (in MimeKit.Core.dll) Version: 5.0.0
public delegate void RtfToTextAttachmentPlaceholderCallback(
int index,
TextWriter writer
)Parameters
- index Int32
- The zero-based index of the placeholder.
- writer TextWriter
- The text writer.
Remarks
The RtfToTextAttachmentPlaceholderCallback delegate is called by RtfToText for each \objattph control word that it renders. Microsoft Outlook and Exchange use \objattph to mark the location in an RTF message body at which each of the message's attachments is rendered, as described by [MS-OXRTFEX] section 2.2.3.4.
The placeholders are numbered from 0 in document order. [MS-OXRTFEX] matches them, in order, with the message's attachments that are not hidden and whose rendering position is not 0xFFFFFFFF, sorted by rendering position. If the number of placeholders does not match the number of those attachments, the placeholders SHOULD be ignored and the attachments appended to the end of the body instead.
The callback may write text (for example, the name of the attachment) to the writer, or nothing at all.