Table of Contents

Constructor EmailContentRenderingBounds

Namespace
MailFathom.Application.EmailContent.Rendering
Assembly
MailFathom.Application.dll

EmailContentRenderingBounds(bool, int, int)

What one rendering may produce, and how much of it a reader may be handed.

public EmailContentRenderingBounds(bool IncludeSanitizedHtml, int MaxCharactersPerRepresentation, int RemainingCharactersForRead)

Parameters

IncludeSanitizedHtml bool

Whether to also produce the sanitized HTML representation.

MaxCharactersPerRepresentation int

The bound every representation is subject to, whatever else the call asked for.

RemainingCharactersForRead int

What the whole read's character budget still allows when this email is reached.

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.