Table of Contents

Method Of

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

Of(int, int)

Chooses the allowance one representation receives from the two bounds that apply to it.

public static EmailBodyCharacterAllowance Of(int maxCharactersPerRepresentation, int remainingCharactersForRead)

Parameters

maxCharactersPerRepresentation int

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

remainingCharactersForRead int

What the whole read's budget still allows, which earlier emails of the same call have already drawn on.

Returns

EmailBodyCharacterAllowance

The smaller of the two bounds, carrying the identity of whichever one it was.

Remarks

A budget already spent yields an allowance of zero rather than a negative one, so a message reached after the budget ran out returns an empty representation that says the budget cut it, instead of failing the whole call.