Table of Contents

Method ActingFor

Namespace
MailFathom.Application.SensitiveContent.Egress
Assembly
MailFathom.Application.dll

ActingFor(MailAccountSensitiveContentPosture)

States that everything guarded on this flow from here on comes out of one account.

public IDisposable ActingFor(MailAccountSensitiveContentPosture posture)

Parameters

posture MailAccountSensitiveContentPosture

The account the use case is acting on, with the posture every value is read under.

Returns

IDisposable

The scope, which restores whatever the flow was acting for when it is disposed.

Remarks

Opened by a use case that holds one mailbox rather than a user's whole mail — a synchronization pass, a derivation enqueued for one account — so the text is judged by the settings written on the account it came out of and by nothing another of that user's mailboxes asked for.

Exceptions

ArgumentNullException

Thrown when posture is null.

ActingFor(UserSensitiveContentPosture)

States whose mail everything guarded on this flow from here on belongs to.

public IDisposable ActingFor(UserSensitiveContentPosture posture)

Parameters

posture UserSensitiveContentPosture

The user the use case resolved and what their mail is read under, read by ReadPostureAcrossAccountsOfAsync(UserId, CancellationToken).

Returns

IDisposable

The scope, which restores whatever the flow was acting for when it is disposed.

Remarks

Opened by the use case, immediately after it has established whose mail it may read and before it reads any. Everything below it — a page assembled, a query placed in a vector space, an extract written into a prompt, an answer published — is that user's, however many layers separate it from here.

The posture is the strictest over the accounts they are assigned, because such a read hands out mail from whichever of them matched and the account is no longer in hand where the value is guarded. A use case that does hold one account names it instead. It is read from the account records once, before the scope is entered, and every value guarded inside the scope is judged by that one reading.

Entering one twice for the same user is an ordinary nesting rather than a mistake: a reader that assembles a conversation inside a content read opens its own, and restoring the previous scope rather than clearing it is what keeps the enclosing read acting for what it resolved.

The scope is published as IDisposable rather than as a type of its own, for the reason BeginScope is: what a caller does with it is dispose it at the end of the method that opened it.

Exceptions

ArgumentNullException

Thrown when posture is null.