Method Rewrite
- Namespace
- MailFathom.Application.EmailContent.Rendering.Document
- Assembly
- MailFathom.Application.dll
Rewrite(MailDocument, IReadOnlyList<string>)
Writes the document back with every text replaced by the one at its position.
public static MailDocument Rewrite(MailDocument document, IReadOnlyList<string> texts)
Parameters
documentMailDocumentThe document to rewrite.
textsIReadOnlyList<string>The replacements, in the order Collect(MailDocument) produced them.
Returns
- MailDocument
The rewritten document.
Exceptions
- ArgumentNullException
Thrown when either argument is null.
- ArgumentException
Thrown when the replacements do not number what the document holds.