Table of Contents

Method RelinkOwnPortraitAsync

Namespace
MailFathom.Application.StoredFiles
Assembly
MailFathom.Application.dll

Links the signed-in user's record to a portrait, or to none.

Task<PortraitRelinking> RelinkOwnPortraitAsync(StoredFileId? portrait, CancellationToken cancellationToken)

Parameters

portrait StoredFileId?

The file to link, or null to link none.

cancellationToken CancellationToken

Cancels the read and the commit.

Returns

Task<PortraitRelinking>

Whether the user is held, and the file the record linked before this write.

It names no user, and resolves the one it writes for from the caller itself, so no implementation can be handed somebody else's record to rewrite.

Exceptions

PrincipalNotAuthorizedException

Thrown when the caller acts for no user, or its grant omits ProfileWrite.

InvalidOperationException

Thrown when the record refused the link for a reason other than a concurrent write.