Method ProposeAsync
- Namespace
- MailFathom.Application.EmailContent.Cleaning
- Assembly
- MailFathom.Application.dll
ProposeAsync(CleanableMailBody, CancellationToken)
Proposes which blocks of one body to keep.
Task<MailBodyCleaningProposal> ProposeAsync(CleanableMailBody body, CancellationToken cancellationToken)
Parameters
bodyCleanableMailBodyThe outline of the reduced body, which is the whole of what may be sent.
cancellationTokenCancellationTokenCancels the proposal when the reader stops waiting for it.
Returns
- Task<MailBodyCleaningProposal>
The ranges a producer wrote, or why nothing was proposed.
Remarks
It answers rather than raising: every reason a proposal does not arrive is one the caller already has an outcome for, and the reader is shown the ordinary reduced body in each of them. Cancellation stays outside, being the reader withdrawing the wait rather than a producer failing to answer.
Exceptions
- ArgumentNullException
Thrown when
bodyis null.