Table of Contents

Method ReleaseAsync

Namespace
MailFathom.Application.EmailContent.Release
Assembly
MailFathom.Application.dll

ReleaseAsync(CancellationToken)

Frees one bounded batch of the retained copies, if the deployment has finished carrying its content.

public Task<RetainedContentReleaseResult> ReleaseAsync(CancellationToken cancellationToken)

Parameters

cancellationToken CancellationToken

Cancels the release between payload kinds, leaving what earlier batches freed.

Returns

Task<RetainedContentReleaseResult>

What this request freed, what is retained behind it, and the backlog when it was refused.

Remarks

The grant is the one this deployment allocates to disposing of what it holds rather than the one it allocates to work, because that is what this is: a credential that may ask for the copy must not be able to end it.

One batch spans the payload kinds in the order they are declared, spending what the bound allows on the first kind that has copies to free and carrying the remainder to the next. A kind whose copies are all still inside the safety interval frees nothing and costs the batch nothing, so the interval holds a kind back without stopping the release of the rest.

Exceptions

PrincipalNotAuthorizedException

Thrown when the use case was reached by anything but a caller granted AdminErase.