Class EmailContentRenderingBounds
- Namespace
- MailFathom.Application.EmailContent.Rendering
- Assembly
- MailFathom.Application.dll
What one rendering may produce, and how much of it a reader may be handed.
public sealed record EmailContentRenderingBounds : IEquatable<EmailContentRenderingBounds>
- Inheritance
-
EmailContentRenderingBounds
- Implements
- Inherited Members
Remarks
The bounds are passed in rather than read by the adapter, because they are the use case's privacy control: one of them is spent across the emails a single call names, so only the code sequencing that call knows what is left. An adapter holding its own copy could not be told that an earlier email had already drawn on it.
The two are not interchangeable. The per-representation bound is about one message and applies to the plain text and the markup separately, so a long body cannot decide what the other representation returns. The remaining budget is about the call and is consumed by everything it returns, so it applies across both.
Constructors
- EmailContentRenderingBounds(bool, int, int)
What one rendering may produce, and how much of it a reader may be handed.
Properties
- IncludeSanitizedHtml
Whether to also produce the sanitized HTML representation.
- MaxCharactersPerRepresentation
The bound every representation is subject to, whatever else the call asked for.
- RemainingCharactersForRead
What the whole read's character budget still allows when this email is reached.